Skip to content

Commit e1c6197

Browse files
Merge pull request #28301 from rfredette/ocpbugs-9037-http2-fix
OCPBUGS-9037: Require http 1.1 or earlier when using curl
2 parents ed1b856 + f90ba61 commit e1c6197

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/extended/util/url/url.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ func (ut *Test) ToShell(i int) string {
374374
if len(ut.ProxyHost) != 0 {
375375
proxy = fmt.Sprintf("--connect-to ::%q", ut.ProxyHost)
376376
}
377-
cmd := fmt.Sprintf(`curl -X %s %s %s %s -s -S -o /tmp/body -D /tmp/headers %q`, ut.Req.Method, proxy, strings.Join(headers, " "), post, ut.Req.URL)
377+
// curl's output for http/2 isn't parseable with go's net/http package, so force http/1.1 or older with --http1.1
378+
cmd := fmt.Sprintf(`curl --http1.1 -X %s %s %s %s -s -S -o /tmp/body -D /tmp/headers %q`, ut.Req.Method, proxy, strings.Join(headers, " "), post, ut.Req.URL)
378379
cmd += ` -w '{"code":%{http_code}}'`
379380
if ut.SkipVerify {
380381
cmd += ` -k`

0 commit comments

Comments
 (0)