Skip to content

Conversation

jiajunhuang
Copy link

As https://tools.ietf.org/html/rfc2616#page-117 says:

HTTP/1.1 defines the "close" connection option for the sender to signal that the connection will be closed after completion of the response.

But it does not specify the connection should be closed by client or server, for safety, if Connection: close
is set in response header, server should close the connection after write data. Recently we have been
affect by this issue: we write a lots of data to client, but the client does not close the connection(
keep-alive is set by default in HTTP/1.1), so memory is still hold by response, and memory is used up.

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Nov 24, 2018
@gopherbot
Copy link
Contributor

This PR (HEAD: e956b9c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/151117 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 1: Run-TryBot+1

This seems like it should also have an associated unit test.

Is there an issue associated with this change?


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=e3a35643


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Build is still in progress...
This change failed on misc-compile-mips:
See https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-mips_ed8d02a7.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1: TryBot-Result-1

19 of 19 TryBots failed:
Failed on misc-compile-mips: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-mips_ed8d02a7.log
Failed on misc-compile-plan9: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-plan9_4e2c0f9d.log
Failed on js-wasm: https://storage.googleapis.com/go-build-log/e3a35643/js-wasm_ec76ef13.log
Failed on misc-compile: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile_45be1eaa.log
Failed on misc-compile-freebsd: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-freebsd_2f225892.log
Failed on misc-compile-nacl: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-nacl_0d9c9d4d.log
Failed on misc-compile-ppc: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-ppc_8d9736fb.log
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/e3a35643/freebsd-amd64-12_0_f1f2d5bc.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/e3a35643/linux-amd64-race_2baf0ab3.log
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/e3a35643/linux-amd64_6031f779.log
Failed on misc-compile-openbsd: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-openbsd_711ff38e.log
Failed on misc-vet-vetall: https://storage.googleapis.com/go-build-log/e3a35643/misc-vet-vetall_756cd6dc.log
Failed on misc-compile-netbsd: https://storage.googleapis.com/go-build-log/e3a35643/misc-compile-netbsd_9600f362.log
Failed on nacl-amd64p32: https://storage.googleapis.com/go-build-log/e3a35643/nacl-amd64p32_8dfac194.log
Failed on nacl-386: https://storage.googleapis.com/go-build-log/e3a35643/nacl-386_9aca1dee.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/e3a35643/openbsd-amd64-64_58902db7.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/e3a35643/linux-386_af4406ed.log
Failed on windows-amd64-2016: https://storage.googleapis.com/go-build-log/e3a35643/windows-amd64-2016_320288d9.log
Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/e3a35643/windows-386-2008_3d933e67.log

Consult https://build.golang.org/ to see whether they are new failures.


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Dave Cheney:

Patch Set 1: Code-Review-2

Hello,

Thank you for contributing this fix. There are a few problems which you will need to address before it can be merged.

  1. Each bugfix should have an associated bug. Please raise an issue on golang/go and then note the issue number in your PR with "Fixes #NNNN" where NNNN is the github issue number

  2. Each bugfix must have a test to assert that it both fixes the problem outlined in the issue and ensures that the fix cannot be inadvertently reverted in the future.

Please address these issues so your PR can be considered.

Thanks

Dave


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Brad Fitzpatrick:

Patch Set 1:

(1 comment)

This would need a test too.


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: fa6a810) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/151117 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@jiajunhuang
Copy link
Author

Hi, all, it seems that it's hard to write unit test for it, since net.Conn can't be accessed from http.Request. So I can test response.Write directly, but it's meaning less.

@gopherbot
Copy link
Contributor

Message from Mikio Hara:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/151117.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/151117 has been abandoned.

6 months with no response

@gopherbot gopherbot closed this Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants