[wp-trac] [WordPress Trac] #14184: empty() and "0" in class-http.php
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 5 03:30:31 UTC 2010
#14184: empty() and "0" in class-http.php
--------------------------+-------------------------------------------------
Reporter: mailnew2ster | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP | Version:
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by jacobsantos):
I agree that the cookie and header are bugs and should be fixed. The
others, I will say no. I have argued coding style before and it is more or
less like talking to a brick wall. Get on IRC and talk to one of the core
committers and have at it. If they decide that all string comparisons are
going to be checked with {{{$var == ''}}}, then so be it.
The research was using both the RFCs and using live data and looking at
the raw chunk-encoded body. In all of the cases I've looked at (the raw
chunked encoded body), the last was always a '0'. That is not to say that
corrections or errata of the standard won't change that or that it will
always be that way. It is to simply say that live data at that time did
not suggest that two digits for the last chunk were used and the
implementation reflected that.
I can't tell you how much time, testing, and effort went into checking and
double checking against the RFCs, live data, and unit testing against real
servers. What you read in the RFC is sometimes not what you see in live
environments. Always be "liberal with input and conservative with output."
[http://www.postel.org/postel.html] Meaning accept as much as you can and
try to correct another mistakes.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14184#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list