[PR #7834] [MERGED] server: fix Transport override #17801

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7834
Author: @bmizerany
Created: 11/25/2024
Status: Merged
Merged: 11/25/2024
Merged by: @bmizerany

Base: mainHead: bmizerany/fixtransportoverride


📝 Commits (1)

  • 8f37964 server: fix Transport override

📊 Changes

1 file changed (+7 additions, -9 deletions)

View changed files

📝 server/images.go (+7 -9)

📄 Description

This changes makeRequest to update the http client Transport if and only if testMakeRequestDialContext is set. This is to avoid overriding the default Transport when testMakeRequestDialContext is nil, which broke existing behavior, included proxies, timeouts, and other behaviors.

Fixes #7829
Fixes #7788


🔄 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/7834 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 11/25/2024 **Status:** ✅ Merged **Merged:** 11/25/2024 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/fixtransportoverride` --- ### 📝 Commits (1) - [`8f37964`](https://github.com/ollama/ollama/commit/8f37964e2892ed6321c84accbf8022664dbbf426) server: fix Transport override ### 📊 Changes **1 file changed** (+7 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+7 -9) </details> ### 📄 Description This changes makeRequest to update the http client Transport if and only if testMakeRequestDialContext is set. This is to avoid overriding the default Transport when testMakeRequestDialContext is nil, which broke existing behavior, included proxies, timeouts, and other behaviors. Fixes #7829 Fixes #7788 --- <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:14:24 -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#17801