[wp-trac] [WordPress Trac] #11428: WP_Http_ExtHTTP response code testing
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 25 14:33:25 UTC 2009
#11428: WP_Http_ExtHTTP response code testing
--------------------------+-------------------------------------------------
Reporter: arena | Owner: dd32
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.9.1
Component: HTTP | Version: 2.9
Severity: major | Keywords: has-patch
--------------------------+-------------------------------------------------
Comment(by arena):
Replying to [comment:17 dd32]:
> > what do you mean by "non-200 bases?" ?
>
> I mean non-{{{200 OK}}} responses, From what i can see from your patch,
basically you're saying that even if Error is set to true, but its a 200
response, then it shouldnt recieve an error?
In the existing code, Error is set to true because $info['error'] (from
php function http_request (http://php.net/http_request)) is not empty ...
but in that case this is just a warning ...
>
> What about a 404 status document that had the same issue?
>
> I cant give any examples since i cant get the darn thing to work at all.
>
404 is not found, so that is an error !!!
> The more i look at this ticket.. The more i keep seeing, This cant be
done reliably. In your example, The entire document has been recieved, but
the Extension is returning a error condition?
this is just a warning ... (see above)
>
> If thats right, Then in your example, If only half the document was
recieved, and the same error arrised, What would be the correct thing to
do?
i am sure i would get another http error code (not 200).
>
> I'm thinking, might be best to compare {{{Content-Length: 7185}}} and
{{{[size_download] => 7185}}} or.. alternativly.. just ignore the
extension since its buggy?
>
> What i'm trying to get at is, Your patch seems to me, to say, "Hey, It
thinks an error has occured, but i've at least recieved a HTTP header, so
everything must be alright!"
all this stuff below is returned by php function http_request
(http://php.net/http_request)
{{{
(
....
[response_code] => 200
....
[error] => Operation timed out after 1 seconds with 30492 out of
222394 bytes received
)
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11428#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list