[wp-trac] [WordPress Trac] #17010: Inconsistent handling of HTTP response codes
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 1 11:36:53 UTC 2011
#17010: Inconsistent handling of HTTP response codes
--------------------------+------------------------------
Reporter: sivel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP | Version: 3.1
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+------------------------------
Comment (by gingerbread):
Replying to [comment:2 sivel]:
> I believe the only time that we should return WP_Error is if the
transport failed, not due to the status of the request as defined by the
response code.
>
> We should always return the response, and only return WP_Error for an
actual transport failure.
I like that approach.
And as an additional idea: As long as a (partial) response has been even
given while an error occurred of such type that an WP_Error is considered
to be returned, we should add the (partial) response data to the WP_Error
object.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17010#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list