gabriel / muse public
fix main #11 / 44
AI Agent gabriel · 10 days ago · May 29, 2026 · Diff

fix: use http.client for R2 PUT to avoid Content-Type auto-injection

urllib.request.urlopen() auto-adds 'Content-Type: application/x-www-form-urlencoded' to any request with a body, which breaks S3/MinIO V2 presigned PUT signatures (signed with empty Content-Type). Switch to http.client.HTTPConnection directly for the R2 PUT — full header control, only Content-Length sent.

Verified: 1 commit and 5 commit pushes both succeed to localhost.

sha256:7a59846a92918d24b441ef3821a51fa47e16feedc844f411204c853a120fce89 sha
+2 ~2 symbols
sha256:6262d95323daed78f4671611b810350ba6e8bf68b4a6ed44d41d3ce8e6f0ccfb snapshot
+2
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 4 symbols
~ muse/cli/commands/push.py .py 2 symbols added, 2 symbols modified
+ _http_client import import _http_client L113–113
+ _urllib_parse import import _urllib_parse L117–117

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:7a59846a92918d24b441ef3821a51fa47e16feedc844f411204c853a120fce89 --body "your comment"