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

http.Request.write doesn't handle bw.Flush()'s error #2645

Closed
gopherbot opened this issue Jan 2, 2012 · 3 comments
Closed

http.Request.write doesn't handle bw.Flush()'s error #2645

gopherbot opened this issue Jan 2, 2012 · 3 comments

Comments

@gopherbot
Copy link

by nekotaroh:

What steps will reproduce the problem?
1. invoke a http request whose total size is less than 4096byte(default buffuered size)
2. close this server side connection before sending 1's request is done
3. http.Request.write can't detect sending error

What is the expected output?
Flush's error

What do you see instead?
No error happend(next socket operations will fail)

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Linux 3.0.0-12-server #20-Ubuntu SMP x86_64
Linux 2.6.18-238.12.1.el5.028stab091.1 #1 SMP x86_64

Which revision are you using?  (hg identify)
c1702f36df03+ (release-branch.r60) release/release.r60.3
4a8268927758 weekly/weekly.2011-12-22

Please provide any additional information below.
#2616's issue can't be fixed completely without fixing this issue. because can not
detect`pc.cc.Write(req)`'s error in (*persistConn).roundTrip.

attached a patch for r60.3

Attachments:

  1. request.patch (362 bytes)
@bradfitz
Copy link
Contributor

bradfitz commented Jan 9, 2012

Comment 1:

We don't submit patches over the bug tracker.
To submit code changes, see:
http://golang.org/doc/contribute.html
Notably,
1) you need to submuit a CLA (http://golang.org/doc/contribute.html#copyright)
2) you need to use the codereview site.
Alternatively, I could work on fixing this independently, but I'd prefer to take your
change if you want to do the steps above.

Owner changed to @bradfitz.

Status changed to Accepted.

@gopherbot
Copy link
Author

Comment 2 by nekotaroh:

submitted patches.
http://golang.org/cl/5532057/

@bradfitz
Copy link
Contributor

Comment 3:

Closing this bug, since 2616 includes this.  (at least the fix,
http://golang.org/cl/5532057/, references both of these bug numbers)
If you want to submit this fix as a separate commit first, feel free to do "Fixes issue
2645" anyway, even though this is closed, and we can submit that one first.
Or we can just do them together in one CL.

Status changed to Duplicate.

Merged into issue #2616.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
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

2 participants