[GH-ISSUE #6917] downloadChunk does not pass the Authorization header to the registry #4377

Open
opened 2026-04-12 15:18:48 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @alexmavr on GitHub (Sep 23, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6917

What is the issue?

In #5994 , regOpts were removed from the blobDownload.downloadChunk method as unnecessary. While it's true that the ollama library only offers public blobs, the lack of regOpts means that all GET /v2/<image>/blobs/... requests with a Range header cannot be accompanied by an Authorization header.

This removal now breaks the mirrored behavior with blobUpload.uploadPart where the RegOpts and corresponding Authorization header are still passed to each invocation.

I tried adding the Authorization: Bearer token to the request, but it looks like pulls from registry.ollama.ai are breaking with this change, most likely because the header is being passed to the cloudflarestorage.com URLs.


### OS

macOS

### GPU

Apple

### CPU

Apple

### Ollama version

0.3.11
Originally created by @alexmavr on GitHub (Sep 23, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6917 ### What is the issue? In #5994 , `regOpts` were removed from the `blobDownload.downloadChunk` method as unnecessary. While it's true that the ollama library only offers public blobs, the lack of regOpts means that all `GET /v2/<image>/blobs/...` requests with a `Range` header cannot be accompanied by an `Authorization` header. This removal now breaks the mirrored behavior with [blobUpload.uploadPart](https://github.com/ollama/ollama/blob/main/server/upload.go#L152) where the RegOpts and corresponding `Authorization header` are still passed to each invocation. I tried adding the `Authorization: Bearer` token to the request, but it looks like pulls from `registry.ollama.ai` are breaking with this change, most likely because the header is being passed to the cloudflarestorage.com URLs. ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.11
GiteaMirror added the bug label 2026-04-12 15:18:48 -05:00
Author
Owner

@bmizerany commented on GitHub (Oct 5, 2024):

Do you mind sharing what goal you're trying to accomplish? It would also be very helpful to have instructions for reproducing the behaviors you are seeing, accompanied by a description of what you expected to see.

<!-- gh-comment-id:2395206607 --> @bmizerany commented on GitHub (Oct 5, 2024): Do you mind sharing what goal you're trying to accomplish? It would also be very helpful to have instructions for reproducing the behaviors you are seeing, accompanied by a description of what you expected to see.
Author
Owner

@bmizerany commented on GitHub (Oct 5, 2024):

Note: For the time being, our registry API is not "official" and is subject to change. This may change in the near future, but for now it should be considered in flux.

<!-- gh-comment-id:2395207271 --> @bmizerany commented on GitHub (Oct 5, 2024): Note: For the time being, our registry API is not "official" and is subject to change. This may change in the near future, but for now it should be considered in flux.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4377