Skip to content

fix(http-client): do not advertise brotli for streamed requests - #67062

Open
lazerg wants to merge 2 commits into
nextcloud:masterfrom
lazerg:fix/issue-67009-stream-accept-encoding
Open

lazerg wants to merge 2 commits into
nextcloud:masterfrom
lazerg:fix/issue-67009-stream-accept-encoding

Conversation

@lazerg

@lazerg lazerg commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

The client offered br whenever libcurl supports brotli, but requests with 'stream' => true sent through a Utils::chooseHandler() client go to Guzzle's StreamHandler, which only decodes gzip and deflate. A brotli reply then reached the caller still compressed, so json_decode() returned null. Streamed requests now only advertise gzip.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: lazerg <lazerg2@gmail.com>
Assisted-by: ClaudeCode:claude-opus-5-5
@lazerg
lazerg requested a review from a team as a code owner November 27, 2026 07:44
@lazerg
lazerg requested review from Altahrim and salmart-dev and removed request for a team November 27, 2026 07:44
Signed-off-by: lazerg <lazerg2@gmail.com>
Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP client advertises Accept-Encoding: br, gzip on streamed requests, but Guzzle's StreamHandler cannot decode brotli → corrupted response body

1 participant