Skip to content

Commit 2358ba2

Browse files
authored
Only set HTTP1 when HTTP/2 Prior Knowledge flag is false in buf curl (#4036)
1 parent f74c416 commit 2358ba2

File tree

1 file changed

+1
-1
lines changed
  • private/buf/cmd/buf/command/curl

1 file changed

+1
-1
lines changed

private/buf/cmd/buf/command/curl/curl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ func makeHTTPRoundTripper(f *flags, isSecure bool, authority string, printer ver
11311131
}
11321132
}
11331133
protocols := new(http.Protocols)
1134-
protocols.SetHTTP1(true)
1134+
protocols.SetHTTP1(!f.HTTP2PriorKnowledge)
11351135
protocols.SetHTTP2(true)
11361136
protocols.SetUnencryptedHTTP2(f.HTTP2PriorKnowledge && !isSecure)
11371137
return &http.Transport{

0 commit comments

Comments
 (0)