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

close request stream after writing the body to it #1

Merged
merged 1 commit into from
Jul 16, 2013

Conversation

bgentry
Copy link
Contributor

@bgentry bgentry commented Jul 16, 2013

Without the fix, the included test hangs when the server attempts to read the request body.

However, this is still broken:

$ go test
--- FAIL: TestConnPostShortBody (0.00 seconds)
    readrequest_test.go:352: Response: Header = map[Content-Type:[text/css]] want map[Content-Length:[5] Content-Type:[text/css]]
    readrequest_test.go:352: Response: ContentLength = -1 want 5
FAIL
exit status 1
FAIL    github.com/kr/spdy  0.041s

Missing a Content-Length header in the response, and the ContentLength value is set to -1.

@kr
Copy link
Owner

kr commented Jul 16, 2013

Looks good to me.

Soon we'll want to refactor that test so it shares
most of the duplicated code with TestConnGet.

@kr kr merged commit 94e30d8 into kr:master Jul 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants