Skip to content

fix(federation): avoid empty body on signed requests - #2993

Merged
blizzz merged 1 commit into
mainfrom
fix/federation-http1
Sep 11, 2026
Merged

fix(federation): avoid empty body on signed requests#2993
blizzz merged 1 commit into
mainfrom
fix/federation-http1

Conversation

@benjaminfrueh

Copy link
Copy Markdown
Contributor

Summary

Federated signed requests with empty body are sent with content-length: 0.
On some setups this header doesn't reach the receiving instance, which then rejects the requests with error missing content-length in header.

Solution

Send a minimal non-empty body {} instead of an empty string.

This is a limitation in core IncomingSignedRequest::verifyHeaders(), which requires the content-length header even when the body is empty. Working around it here because a core fix would need its own PR in nextcloud/server.

🤖 AI (if applicable)

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

@benjaminfrueh benjaminfrueh changed the title fix(federation): avoid empty body on signed requests so content-lengt… fix(federation): avoid empty body on signed requests Sep 11, 2026
…h doesn't geremoved

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@blizzz
blizzz merged commit 477ac5e into main Sep 11, 2026
84 of 88 checks passed
@blizzz
blizzz deleted the fix/federation-http1 branch September 11, 2026 21:19
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.

2 participants