Skip to content

close http request body after read it. #10534

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

Merged
merged 1 commit into from
Mar 12, 2019
Merged

close http request body after read it. #10534

merged 1 commit into from
Mar 12, 2019

Conversation

johncming
Copy link
Contributor

@johncming johncming commented Mar 11, 2019

close it after readhttp.Request.Body .

one of them is:

func (h *httpKVAPI) ServeHTTP(w http.ResponseWriter, r *http.Request) {
key := r.RequestURI
switch {

@johncming johncming changed the title contrib/raftexample: close http request body after read. close http request body after read it. Mar 11, 2019
@codecov-io
Copy link

codecov-io commented Mar 11, 2019

Codecov Report

Merging #10534 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10534      +/-   ##
==========================================
+ Coverage   71.62%   71.78%   +0.16%     
==========================================
  Files         393      393              
  Lines       36521    36522       +1     
==========================================
+ Hits        26157    26219      +62     
+ Misses       8539     8487      -52     
+ Partials     1825     1816       -9
Impacted Files Coverage Δ
lease/leasehttp/http.go 65.69% <100%> (+0.25%) ⬆️
pkg/fileutil/read_dir.go 91.3% <0%> (-8.7%) ⬇️
pkg/fileutil/purge.go 65.9% <0%> (-6.82%) ⬇️
clientv3/leasing/cache.go 87.77% <0%> (-3.89%) ⬇️
clientv3/leasing/txn.go 88.09% <0%> (-3.18%) ⬇️
raft/storage.go 89.81% <0%> (-1.86%) ⬇️
clientv3/leasing/kv.go 89.7% <0%> (-1%) ⬇️
etcdserver/api/rafthttp/pipeline.go 97.5% <0%> (ø) ⬆️
etcdserver/server.go 74.96% <0%> (+0.14%) ⬆️
clientv3/balancer/grpc1.7-health.go 59.3% <0%> (+0.29%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7ad8c6...e46af03. Read the comment docs.

@xiang90
Copy link
Contributor

xiang90 commented Mar 11, 2019

@johncming can you squash 4 commits into 1?

@johncming
Copy link
Contributor Author

@johncming can you squash 4 commits into 1?

ok. i will do it.

affected modules:
- lease/leasehttp
- contrib/raftexample
@xiang90 xiang90 merged commit dc50416 into etcd-io:master Mar 12, 2019
@johncming johncming deleted the close_reader branch March 13, 2019 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants