Fix Smart HTTP push framing - #442
Merged
genedna merged 1 commit intoJul 22, 2026
Merged
Conversation
Ivanbeethoven
marked this pull request as ready for review
July 22, 2026 05:52
genedna
approved these changes
Jul 22, 2026
genedna
added a commit
to Ivanbeethoven/libra
that referenced
this pull request
Aug 8, 2026
Resolve the src/internal/auth.rs conflict in favour of main. Both fixes this branch carried have already landed upstream independently: - the Smart HTTP push framing change (bytes::Bytes body plus Accept, User-Agent and Content-Length headers) merged as 9209b9f via libra-tools#442; - HostScope::from_request_url was fixed on main by 1239bbd, which drops straight to scope_of instead of normalizing the URL to its origin first. The two spellings are behaviourally identical — this branch set the path to "/" and cleared query/fragment so that from_url's refusals became no-ops before it delegated to scope_of — so main's simpler form is kept. The merged tree is byte-identical to origin/main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
AcceptandUser-Agentheaders for Smart HTTP receive-pack requestsBytesrequest body and set its exactContent-LengthWhy
Some Git-compatible gateways reject or proxy-fail Libra receive-pack POSTs when the request framing differs from native Git. Against a mega deployment this surfaced as
502 Bad Gateway, while nativegit pushsucceeded.Impact
Libra Smart HTTP pushes now use deterministic request framing and headers compatible with native Git receive-pack endpoints.
Validation
cargo fmt --check