-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net/http/httputil: DumpResponse does not print response headers for PUT and DELETE methods. #13942
Comments
|
A simple fix fixes this, wanted to know if this is correct. or Should i change this failuretoReadBody{} to eofReader{} |
I don't understand what the actual bug report is from your paste dump above. Please describe in words & also provide full sample code to reproduce, and explain your expected results. I don't know what you hope to see, and don't know how you arrived at the thing you're apparently unhappy with. |
Sure let me do that. Sorry about not pasting enough info. |
Here is a sample code and output.
|
If you observe PUT is not printing its response headers at all. |
This actually happens because of few conditions
|
Just changing
errNoBody to io.EOF fixes this problem, but trying to fix the tests which are failing. |
CL https://golang.org/cl/18624 mentions this issue. |
With this change fixes our problem, here is the output for the sample program now.
|
Due to a golang bug need to add specific code to handle this properly when the response body has ContentLength of '0' Ref for more info : golang/go#13942.
Due to a golang bug need to add specific code to handle this properly when the response body has ContentLength of '0' Ref for more info : golang/go#13942.
The text was updated successfully, but these errors were encountered: