[wp-trac] [WordPress Trac] #17010: Inconsistent handling of HTTP response codes

WordPress Trac noreply at wordpress.org
Mon Sep 28 20:32:55 UTC 2015


#17010: Inconsistent handling of HTTP response codes
--------------------------------------+------------------------------
 Reporter:  sivel                     |       Owner:  johnbillion
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  lowest                    |   Milestone:  Awaiting Review
Component:  HTTP API                  |     Version:  3.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests
 * priority:  normal => lowest


Comment:

 Replying to [comment:9 dd32]:
 > I'm going to make Streams/fsockopen return the same as curl.

 [attachment:17010.diff] brings the behaviour of Streams into line with
 cURL, by forcibly returning a `WP_Error` if the HTTP status code is a
 `1xx`.

 The unit test is part of the `external-http` group. Place the `status.php`
 file somewhere accessible and change the URL in the
 `test_http_response_code_handling()` test as necessary.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/17010#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list