[PR #486] [MERGED] fix: retry push on expired token #36051

Closed
opened 2026-04-22 20:46:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/486
Author: @mxyng
Created: 9/7/2023
Status: Merged
Merged: 9/7/2023
Merged by: @mxyng

Base: mainHead: mxyng/fix-push


📝 Commits (2)

📊 Changes

3 files changed (+32 additions, -23 deletions)

View changed files

📝 server/auth.go (+1 -1)
📝 server/images.go (+6 -4)
📝 server/upload.go (+25 -18)

📄 Description

There's two bug that need to be fixed:

  1. makeRequest to the redirectURL should not supply regOpts since it's not the registry. This erroneously overrides the Authorization Header making the request invalid.
  2. The upload chunk was not resetting the section correctly. It also should to interrupt the goroutine writing into the pipe

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/486 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 9/7/2023 **Status:** ✅ Merged **Merged:** 9/7/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-push` --- ### 📝 Commits (2) - [`f0f4943`](https://github.com/ollama/ollama/commit/f0f49435771352c4d1e432351675d10d9e23c099) fix get auth token - [`bf146fb`](https://github.com/ollama/ollama/commit/bf146fb072b8dbf49efa2f874959ad978c48bf29) fix retry on unauthorized chunk ### 📊 Changes **3 files changed** (+32 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `server/auth.go` (+1 -1) 📝 `server/images.go` (+6 -4) 📝 `server/upload.go` (+25 -18) </details> ### 📄 Description There's two bug that need to be fixed: 1. `makeRequest` to the `redirectURL` should not supply `regOpts` since it's not the registry. This erroneously overrides the `Authorization` Header making the request invalid. 2. The upload chunk was not resetting the section correctly. It also should to interrupt the goroutine writing into the pipe --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 20:46:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#36051