[PR #7231] [CLOSED] fix: consider any status code as redirect #17630

Closed
opened 2026-04-16 06:09:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7231
Author: @XciD
Created: 10/16/2024
Status: Closed

Base: mainHead: fix-redirect


📝 Commits (2)

  • 0a47ac7 consider any status code as redirect and fix status 200
  • b046709 use 302/307 and 200 as statusCode

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 server/download.go (+6 -3)

📄 Description

When retrieving the url for downloading a model, ollama always consider that the model is host on a CDN.

This PR resolve:

  • If 200 is return on the same host, just return the current url
  • Consider any 3xx as a redirect url

🔄 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/7231 **Author:** [@XciD](https://github.com/XciD) **Created:** 10/16/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-redirect` --- ### 📝 Commits (2) - [`0a47ac7`](https://github.com/ollama/ollama/commit/0a47ac7fde235846d8641a161f82cf20904e5a8e) consider any status code as redirect and fix status 200 - [`b046709`](https://github.com/ollama/ollama/commit/b0467096266d06bd1fc20418356353861e4f4b1a) use 302/307 and 200 as statusCode ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `server/download.go` (+6 -3) </details> ### 📄 Description When retrieving the url for downloading a model, ollama always consider that the model is host on a CDN. This PR resolve: - If 200 is return on the same host, just return the current url - Consider any 3xx as a redirect url --- <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-16 06:09:11 -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#17630