Skip to content

Fix Smart HTTP push framing - #442

Merged
genedna merged 1 commit into
libra-tools:mainfrom
Ivanbeethoven:agent/fix-smart-http-push-framing
Jul 22, 2026
Merged

Fix Smart HTTP push framing#442
genedna merged 1 commit into
libra-tools:mainfrom
Ivanbeethoven:agent/fix-smart-http-push-framing

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

What changed

  • send Git-compatible Accept and User-Agent headers for Smart HTTP receive-pack requests
  • use a concrete Bytes request body and set its exact Content-Length
  • preserve retryable request bodies across Basic authentication attempts

Why

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 native git push succeeded.

Impact

Libra Smart HTTP pushes now use deterministic request framing and headers compatible with native Git receive-pack endpoints.

Validation

  • cargo fmt --check
  • built Libra 0.19.40 locally under WSL
  • verified a Libra Smart HTTP push reached mega receive-pack successfully instead of returning 502
  • verified the full push advanced to mega's repository policy/object-storage processing; remaining failures were server-side RustFS/S3 PUT errors

@Ivanbeethoven
Ivanbeethoven marked this pull request as ready for review July 22, 2026 05:52
@genedna
genedna merged commit 9209b9f into libra-tools:main Jul 22, 2026
3 of 9 checks passed
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