[PR #23857] [CLOSED] Filter hop-by-hop headers in ALL SSE proxy paths (openai.py) - fix #23856 #43041

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23857
Author: @bobo-xxx
Created: 4/17/2026
Status: Closed

Base: mainHead: clawoss/fix/openai-strip-hop-by-hop-headers-complete


📝 Commits (1)

  • aeeb209 Filter hop-by-hop headers in ALL SSE proxy paths (openai.py)

📊 Changes

1 file changed (+16 additions, -4 deletions)

View changed files

📝 backend/open_webui/routers/openai.py (+16 -4)

📄 Description

Summary

Extends the fix from PR #23856 to all streaming response paths in that forward upstream headers to the client. The original PR only addressed , but , , and can also trigger when hop-by-hop headers like , , , and are forwarded through a different HTTP stack.

Changes

  • Added constant (matching the pattern already used in )
  • Added helper function
  • Applied the helper to all four SSE streaming paths in :
    1. (line ~1201)
    2. (line ~1288)
    3. (line ~1404)
    4. (line ~1510)

Testing

The fix follows the same pattern as the existing fix in which correctly strips these headers. All four code paths now use the same filtering approach before passing headers to .

Fixes

Fixes open-webui#23856


🔄 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/open-webui/open-webui/pull/23857 **Author:** [@bobo-xxx](https://github.com/bobo-xxx) **Created:** 4/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `clawoss/fix/openai-strip-hop-by-hop-headers-complete` --- ### 📝 Commits (1) - [`aeeb209`](https://github.com/open-webui/open-webui/commit/aeeb2096a3fed5ada5f36163cbb8e2581983a47f) Filter hop-by-hop headers in ALL SSE proxy paths (openai.py) ### 📊 Changes **1 file changed** (+16 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/openai.py` (+16 -4) </details> ### 📄 Description ## Summary Extends the fix from PR #23856 to all streaming response paths in that forward upstream headers to the client. The original PR only addressed , but , , and can also trigger when hop-by-hop headers like , , , and are forwarded through a different HTTP stack. ## Changes - Added constant (matching the pattern already used in ) - Added helper function - Applied the helper to all four SSE streaming paths in : 1. (line ~1201) 2. (line ~1288) 3. (line ~1404) 4. (line ~1510) ## Testing The fix follows the same pattern as the existing fix in which correctly strips these headers. All four code paths now use the same filtering approach before passing headers to . ## Fixes Fixes open-webui#23856 --- <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-25 14:45: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/open-webui#43041