-
Notifications
You must be signed in to change notification settings - Fork 85
Missing setting of CURLINFO_HEADER_OUT option #8
Conversation
@bashofmann Hi! I'm looking at the PHP documentation, and In looking in the cURL adapter, I see we are setting the |
I'm talking about the request headers. In
so that later on the complete send request including request headers and (if available) request body will be available in Client::getLastRawRequest. The documentation says: CURLINFO_HEADER_OUT - The request string sent. For this to work, add the CURLINFO_HEADER_OUT option to the handle by calling curl_setopt() This curl_setopt is missing. This has nothing to do with the response headers. |
Same problem here. Since last upgrade we are missing request headers in tracking data.. see http://php.net/manual/en/function.curl-getinfo.php -> Return Values:
|
Enables the CURLINFO_HEADER_OUT option to ensure that we can later retrieve the full request string.
I've converted this issue into a pull request, and it provides a fix. I have zero idea how to test this other than doing an integration test; @bashofmann or @benjaminradtke - can one of you test with one of your apps? |
I enabled the online tests locally, and discovered that adding this fixes several existing test failures. I'll get this merged and released ASAP. Thanks for the report and the clarifications! |
Hey @weierophinney thanks for your quick reply. Of course I will test it with our app, to remove our workaround. |
Works like a charm - but I am not sure if you should put that statement in the later else path:
This is, where it was placed before since ZF 1.12.8 |
This is where it was placed in ZF 1.12.8 (zendframework/zf1@5e34268)
Considering we always call |
The CURLINFO_HEADER_OUT option is not set in the curl adapter which results in Client::getLastRawRequest to be empty