Requests icon indicating copy to clipboard operation
Requests copied to clipboard

Missing Available Hook in Doc and Missing Hook Parameter

Open mamist2790 opened this issue 9 years ago • 1 comments

There is a hook, 'curl.after_send', located in Requests/Transport/cURL.php on line 165 that is not listed in the Hooks section of the documentation. Also, the parameters array is empty and I believe it should include &$this->handle.

For example in my case I need to have access to the request headers in case of an error so I can log them. I set CURLINFO_HEADER_OUT using curl_setopt in my curl.before_send hook. In order to actually access that header though I still need access to the handle when using the curl.after_send hook.

mamist2790 avatar Jun 20 '16 20:06 mamist2790

Before we actually action this, we should have a good look at the security implications of allowing access to the $handle (not just here).

jrfnl avatar Feb 28 '22 16:02 jrfnl