Merge pull request #10494 from hyuraku/utils/curl_refactor-curl_with_workarounds
utils/curl: refactor curl_with_workarounds
This commit is contained in:
commit
c5c151d2b3
@ -72,7 +72,11 @@ module Utils
|
|||||||
env: { "SSL_CERT_FILE" => nil }.merge(env),
|
env: { "SSL_CERT_FILE" => nil }.merge(env),
|
||||||
**command_options
|
**command_options
|
||||||
|
|
||||||
if !result.success? && args.exclude?("--http1.1")
|
return result if result.success? || !args.exclude?("--http1.1")
|
||||||
|
|
||||||
|
# Error in the HTTP2 framing layer
|
||||||
|
return curl_with_workarounds(*args, "--http1.1", **command_options, **options) if result.status.exitstatus == 16
|
||||||
|
|
||||||
# This is a workaround for https://github.com/curl/curl/issues/1618.
|
# This is a workaround for https://github.com/curl/curl/issues/1618.
|
||||||
if result.status.exitstatus == 56 # Unexpected EOF
|
if result.status.exitstatus == 56 # Unexpected EOF
|
||||||
out = curl_output("-V").stdout
|
out = curl_output("-V").stdout
|
||||||
@ -87,11 +91,6 @@ module Utils
|
|||||||
return curl_with_workarounds(*args, "--http1.1", **command_options, **options)
|
return curl_with_workarounds(*args, "--http1.1", **command_options, **options)
|
||||||
end
|
end
|
||||||
|
|
||||||
if result.status.exitstatus == 16 # Error in the HTTP2 framing layer
|
|
||||||
return curl_with_workarounds(*args, "--http1.1", **command_options, **options)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user