[wp-trac] [WordPress Trac] #18732: Pass request arguments to the http_api_debug hook

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 27 09:12:06 UTC 2011


#18732: Pass request arguments to the http_api_debug hook
-------------------------+-----------------------
 Reporter:  johnbillion  |       Owner:  dd32
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  3.3
Component:  HTTP         |     Version:  3.3
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------

Comment (by johnbillion):

 Replying to [comment:4 dd32]:
 > only one request can take place at a time therefor, the next call of the
 debug hook is the result for it.
 Yeah that's correct for the debug hook, but not so for the response hook,
 which doesn't get fired if the request returns a WP_Error. If a page
 performs two requests and the first one fails, the first response that
 fires is for the second request. To account for this my plugin gives each
 request a hash and adds it to the request args, which can then be used to
 identify a request and log the error in the dubug hook, or the response in
 the response hook.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18732#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list