-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/transfer encoding fix for get method #1795
Fix/transfer encoding fix for get method #1795
Conversation
… methods When CURLOPT_UPLOAD is sent to curl_setopt method it's resulting with 'Transfer-uncoding: chunked' which rather should not be present in requeast as in section 4.4 of https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
While I generally agree with this, GET and HEAD requests CAN have a body. So the question is whether this causes any real trouble or not. |
Sorry i put wrong paragraph. What I was thinking about was written in section 4.3:
I needed to connect IIS server behind ARR proxy and there i found this problem. The second one is very restrictive about above MUST-NOT be included and throws 502 error. |
Okay. Since we have another PR which tries to loosen these rules within Guzzle, I would like to cross-check with that one to see how it would interfere with this one before merging. But if there is a conflict between sending and not sending body in a GET/HEAD request, I would like Guzzle to stick to the standard and what some servers do in ninja mode. |
OK - Thank you |
@sagikazarmark And how it looks like ? |
Thank you for this PR. I do understand your use case but Im not sure the solution is the best one. As Mark said, GET request may have a body. In side To solve your issue for GET request you may set a Content-Length header to 0. |
I think the aformentioned PR is already merged and will be released as 6.3 I guess merging this PR would go quite the opposite direction, so I am not sure at this point we can merge it as well. |
Sorry for late answer. For my point of view and real live problem I would like to share one on Stackoverflow user analyze. https://stackoverflow.com/a/15656884 |
When CURLOPT_UPLOAD is sent to curl_setopt method it's resulting with 'Transfer-uncoding: chunked' which rather should not be present in GET or HEAD requests as in section 4.4 of https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html