[wp-trac] [WordPress Trac] #25747: The `http_api_debug` hook isn't called for all HTTP requests

WordPress Trac noreply at wordpress.org
Sat Jun 1 16:55:03 UTC 2019


#25747: The `http_api_debug` hook isn't called for all HTTP requests
--------------------------+--------------------------
 Reporter:  johnbillion   |       Owner:  johnbillion
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  5.3
Component:  HTTP API      |     Version:  2.7
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------------
Changes (by johnbillion):

 * keywords:  needs-unit-tests needs-patch => has-patch
 * milestone:  Future Release => 5.3


Comment:

 [attachment:"25747.3.diff"] introduces a much simpler patch than prior
 ones. It calls the `http_api_debug` hook on all erroneous responses.
 There's no need to call the hook for errors being returned by
 `pre_http_request` because it's already catchable via that filter.

 In addition, I've changed the error code for the error returned when
 requests are blocked so that loggers, debuggers, etc can differentiate
 between an unexpected error and an expected one.

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


More information about the wp-trac mailing list