[PR #23928] [CLOSED] fix: strip stale Content-Encoding header from upstream API proxy responses #43070

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23928
Author: @pvyswiss
Created: 4/21/2026
Status: Closed

Base: mainHead: fix/strip-stale-content-encoding


📝 Commits (1)

  • d651448 fix: strip stale Content-Encoding header from upstream API proxy responses

📊 Changes

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

View changed files

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

📄 Description

Summary

Fixes #23920 (Ref: #23917 Bug 1)

  • Strip Content-Encoding, Content-Length, Transfer-Encoding headers at all 4 StreamingResponse locations in openai.py
  • These headers become stale after aiohttp auto-decompresses upstream API responses
  • Forwarding them causes desktop clients to fail with ZlibError
  • See aiohttp#4462

🔄 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/23928 **Author:** [@pvyswiss](https://github.com/pvyswiss) **Created:** 4/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/strip-stale-content-encoding` --- ### 📝 Commits (1) - [`d651448`](https://github.com/open-webui/open-webui/commit/d6514482b47dad8b33f075ee65a992cd99af0c71) fix: strip stale Content-Encoding header from upstream API proxy responses ### 📊 Changes **1 file changed** (+17 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/openai.py` (+17 -4) </details> ### 📄 Description ## Summary Fixes #23920 (Ref: #23917 Bug 1) - Strip `Content-Encoding`, `Content-Length`, `Transfer-Encoding` headers at all 4 `StreamingResponse` locations in `openai.py` - These headers become stale after aiohttp auto-decompresses upstream API responses - Forwarding them causes desktop clients to fail with `ZlibError` - See [aiohttp#4462](https://github.com/aio-libs/aiohttp/issues/4462) --- <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:46:29 -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#43070