Skip to content

Commit

Permalink
Remove duplicate Transfer-Encoding header
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
  • Loading branch information
rht committed Jan 21, 2016
1 parent 89a6f01 commit 73b4985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion commands/http/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ func sendResponse(w http.ResponseWriter, r *http.Request, res cmds.Response, req
}

h.Set(contentTypeHeader, mime)
h.Set(transferEncodingHeader, "chunked")

// set 'allowed' headers
h.Set("Access-Control-Allow-Headers", "X-Stream-Output, X-Chunked-Output")
Expand Down
6 changes: 6 additions & 0 deletions test/sharness/t0060-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ test_expect_success "'ipfs config Identity.PeerID' works" '
PEERID=$(ipfs config Identity.PeerID)
'

# see https://github.com/ipfs/go-ipfs/issues/2190
test_expect_success "test for duplicate Transfer-Encoding Header" '
curl -v -i http://localhost:5001/api/v0/version 2> curl_output &&
test $(grep -c "Transfer-Encoding" curl_output) -eq 1
'

test_expect_success "'ipfs swarm addrs local' works" '
ipfs swarm addrs local >local_addrs
'
Expand Down

0 comments on commit 73b4985

Please sign in to comment.