[wp-trac] [WordPress Trac] #11428: WP_Http_ExtHTTP response code testing
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 25 23:15:12 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 dd32):
{{{ (
....
[response_code] => 200
....
[error] => Operation timed out after 1 seconds with 30492 out of
222394 bytes received
)
}}}
Thats not a warning, Thats an error condition that it has only loaded 10%
of the document in the timeout period.
If the error item cannot be trusted, then extra validation should take
place, such as checking the content length matches the document before
declaring the error invalid.
{{{
404 is not found, so that is an error !!!
}}}
Not in the eyes of the HTTP API, Whilst it may be an HTTP error, That
error should still be passed to the calling function - as a HTTP Request
object (Since the request was OK, just the content was missing) rather
than a WP_Error (Error condition was hit)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11428#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list