Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions go/grpcweb/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ func hackIntoNormalGrpcRequest(req *http.Request) (*http.Request, bool) {
}
req.Header.Set("content-type", strings.Replace(contentType, incomingContentType, grpcContentType, 1))

// Remove content-length header since it represents http1.1 payload size, not the sum of the h2
// DATA frame payload lengths. https://http2.github.io/http2-spec/#malformed This effectively
// switches to chunked encoding which is the default for h2
req.Header.Del("content-length")

return req, isTextFormat
}

Expand Down