소스 검색

server: fix blob download when receiving a 200 response (#6656)

Tobias Heinze 7 달 전
부모
커밋
6fc9d22707
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/download.go

+ 1 - 1
server/download.go

@@ -256,7 +256,7 @@ func (b *blobDownload) run(ctx context.Context, requestURL *url.URL, opts *regis
 				continue
 				continue
 			}
 			}
 			defer resp.Body.Close()
 			defer resp.Body.Close()
-			if resp.StatusCode != http.StatusTemporaryRedirect {
+			if resp.StatusCode != http.StatusTemporaryRedirect && resp.StatusCode != http.StatusOK {
 				return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode)
 				return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode)
 			}
 			}
 			return resp.Location()
 			return resp.Location()