Skip to content
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: DumpRequest only dumps ~ 8k of Body #8089

Closed
gopherbot opened this issue May 24, 2014 · 5 comments
Closed

net/http/httputil: DumpRequest only dumps ~ 8k of Body #8089

gopherbot opened this issue May 24, 2014 · 5 comments
Milestone

Comments

@gopherbot
Copy link
Contributor

by steven.hartland@multiplay.co.uk:

What does 'go version' print?
go version go1.2.2 freebsd/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. use httputil.DumpRequest on a request with a body > 8k
2.
3.

What happened?
Only a partial body is output

What should have happened instead?
The full body should be output

Please provide any additional information below.
The issue is that the http.ReadRequest uses a buffered reader but never requests that
the Body be read entirely.

I have a path will reference this bug report in submission.
@gopherbot
Copy link
Contributor Author

Comment 1 by steven.hartland@multiplay.co.uk:

DumpRequest should read DumpRequestOut.

@gopherbot
Copy link
Contributor Author

Comment 2 by steven.hartland@multiplay.co.uk:

Code review link: https://golang.org/cl/92590043

@ianlancetaylor
Copy link
Member

Comment 3:

Labels changed: added repo-main, release-go1.4.

@gopherbot
Copy link
Contributor Author

Comment 4:

CL https://golang.org/cl/92590043 mentions this issue.

@bradfitz
Copy link
Contributor

Comment 5:

This issue was closed by revision 4a532c6.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Bodies larger than 8KB (the default bufio reader size) weren't
being dumped.  Force a read of the body so they're teed into
the response buffer.

Thanks to Steven Hartland for identifying the problem.

Fixes golang#8089

LGTM=r
R=golang-codereviews, r
CC=adg, golang-codereviews
https://golang.org/cl/144650044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
Bodies larger than 8KB (the default bufio reader size) weren't
being dumped.  Force a read of the body so they're teed into
the response buffer.

Thanks to Steven Hartland for identifying the problem.

Fixes golang#8089

LGTM=r
R=golang-codereviews, r
CC=adg, golang-codereviews
https://golang.org/cl/144650044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Bodies larger than 8KB (the default bufio reader size) weren't
being dumped.  Force a read of the body so they're teed into
the response buffer.

Thanks to Steven Hartland for identifying the problem.

Fixes golang#8089

LGTM=r
R=golang-codereviews, r
CC=adg, golang-codereviews
https://golang.org/cl/144650044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
Bodies larger than 8KB (the default bufio reader size) weren't
being dumped.  Force a read of the body so they're teed into
the response buffer.

Thanks to Steven Hartland for identifying the problem.

Fixes golang#8089

LGTM=r
R=golang-codereviews, r
CC=adg, golang-codereviews
https://golang.org/cl/144650044
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants