Fixes since v0.44 — all user-facing, no new dependencies, no CLI flags added.
Signing / encoding
- Query parameters with
=in the value now sign correctly (issue #169, PR #225).
aws_url_encodepercent-encodes=as%3Dinstead of doubling it, each pair is split on
the first=, and existing percent escapes are preserved (including non-UTF-8 ones), so a
pre-encoded value keeps its meaning instead of being escaped again. --data-binaryno longer raises insidehashlibwhen the payload came from-d/@fileas
text: astrpayload is hashed as its UTF-8 encoding.
CLI
-His parsed on the first colon, so curl-style-H 'Name:value'works and values that
contain colons survive; a malformed fragment exits 2 with a one-line message instead of a
traceback (PR #253).--data-binary @-reads stdin as raw bytes, so binary payloads survive the pipe (PR #253).--profileis handed to botocore, so profiles defined in~/.aws/config(SSO, role assume)
are honoured as well as~/.aws/credentials(PR #250). A missing profile or unresolvable
credentials now printawscurl: error: ...instead of dumping a traceback (PR #254).- Verbose (
-v) output masks credentials: access key, secret key, session/security token,
Authorizationandx-amz-security-token. Beyond PR #254, this release also masks the session
token inside the canonical-request dump and credential headers supplied via-H. Only the
printed copies are masked — the canonical request that is actually signed is unchanged, and a
test asserts that.
Tests / tooling
- Live TLS tests hardened against transient network failures (PR #251).
- Signing timestamp uses a timezone-aware UTC clock;
datetime.utcnow()is deprecated and was
emitting aDeprecationWarningon every request under Python 3.13.amzdate/datestampand
every signature are unchanged. - Dependabot:
actions/checkout7,actions/setup-python7,github/codeql-action4.39.1.
Verification (Python 3.13.17, Linux)
pycodestyle awscurl testsclean — includingtests/, whichscripts/ci.shlints but the
GitHub workflow does not; a missing blank line introduced by PR #254 was failing that local flow.mypy awscurl/ tests/— no issues in 12 files.pytest --cov=awscurl --cov-fail-under=77— 63 passed, 81.94% coverage, run with
-W error::DeprecationWarningso no deprecated API remains.- End-to-end sign-and-send against a local HTTP server:
Authorization: AWS4-HMAC-SHA256 ...and
x-amz-datearrive as expected, andx-amz-content-sha256equalssha256of the body for both
binary stdin and UTF-8 text payloads. - Canonical query strings compared against botocore's own
SigV4Authcanonicalization for tricky
inputs (=,+,/,%,*,', UTF-8, repeated keys): 6/6 identical.
Known gaps (not fixed in this release)
--data-binaryis a flag, not a value-taking option, soawscurl --data-binary @- URLputs@-
in the positional URI slot. Useawscurl -X POST -d @- --data-binary URL.-vstill echoes--uriverbatim, so a presigned URL (whose query carries
X-Amz-Credential/X-Amz-Signature) is printed as-is.