mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
server: fix blob download when receiving a 200 response (#6656)
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user