Skip to content

Commit b77788d

Browse files
committed
up 2024-05-15
1 parent b669138 commit b77788d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PipelineHttp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (r *PipelineHttp) DoGetWithClient4SetHd(client *http.Client, szUrl string,
311311
r.Close()
312312
return
313313
}
314-
if !r.UseHttp2 && nil != resp && 200 != resp.StatusCode {
314+
if !r.UseHttp2 && strings.HasPrefix(szUrl, "https://") && nil != resp && 200 != resp.StatusCode {
315315
r.UseHttp2 = true
316316
if a1 := resp.Header["Alt-Svc"]; 0 < len(a1) && strings.Contains(a1[0], "h3=\"") || strings.HasPrefix(resp.Proto, "HTTP/3") {
317317
r.Client = r.GetClient4Http3()

0 commit comments

Comments
 (0)