You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. So for example if you want to make a proper HEAD request, using -X HEAD will not suffice. You need to use the -I, --head option.
The text was updated successfully, but these errors were encountered:
rscipien
changed the title
CurlHttpClient HEAD request hangs
[HttpClient] CurlHttpClient HEAD request hangs
Oct 24, 2019
… (nicolas-grekas)
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] ignore the body of responses to HEAD requests
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34102
| License | MIT
| Doc PR | -
Commits
-------
0fc371e [HttpClient] ignore the body of responses to HEAD requests
Symfony version(s) affected: 4.3.3
Description
Use HttpClientInterface::request with
$method
param set toHEAD
Depending on installed curl version request hangs.
Not working with curl
How to reproduce
Possible Solution
Change code in Symfony\Component\HttpClient\CurlHttpClient::request. For
HEAD
http metohd use$curlopts[CURLOPT_NOBODY] = 1;
Additional context
https://curl.haxx.se/docs/manpage.html#-X
https://stackoverflow.com/a/770200
The text was updated successfully, but these errors were encountered: