mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #34132 from wenjianhn/http-307
Handle https proxy's CONNECT response
This commit is contained in:
commit
4ac4c8ef4b
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ fetch_blob() {
|
||||||
-D-
|
-D-
|
||||||
)"
|
)"
|
||||||
curlHeaders="$(echo "$curlHeaders" | tr -d '\r')"
|
curlHeaders="$(echo "$curlHeaders" | tr -d '\r')"
|
||||||
if [ "$(echo "$curlHeaders" | awk 'NR == 1 { print $2; exit }')" != '200' ]; then
|
if echo "$curlHeaders" | grep -qE "^HTTP/[0-9].[0-9] 3"; then
|
||||||
rm -f "$targetFile"
|
rm -f "$targetFile"
|
||||||
|
|
||||||
local blobRedirect="$(echo "$curlHeaders" | awk -F ': ' 'tolower($1) == "location" { print $2; exit }')"
|
local blobRedirect="$(echo "$curlHeaders" | awk -F ': ' 'tolower($1) == "location" { print $2; exit }')"
|
||||||
|
|
Loading…
Add table
Reference in a new issue