Skip to content

Commit 14bfb06

Browse files
committed
Fix no HTTP body check
1 parent f184b58 commit 14bfb06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: http2/h2c/h2c.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func convertH1ReqToH2(r *http.Request) (*bytes.Buffer, []http2.Setting, error) {
250250
}
251251
}
252252

253-
if r.Body != nil {
253+
if r.Body != nil && r.Body != http.NoBody {
254254
body, err := ioutil.ReadAll(r.Body)
255255
if err != nil {
256256
return nil, nil, fmt.Errorf("Could not read request body: %v", err)

0 commit comments

Comments
 (0)