pjfanning opened a new pull request, #1907: URL: https://github.com/apache/pekko-connectors/pull/1907
### Motivation `entityForMethodAndContentType` only built a request entity when the method's `requestEntityAcceptance` was `Expected`. GET and DELETE are `Tolerated` in pekko-http, so any SDK request carrying a payload on those methods was silently sent bodiless (and the content publisher was never subscribed). The payload hash is part of the SigV4 signature, so such requests fail server-side in a hard-to-diagnose way. ### Modification - For `Tolerated` methods, attach the SDK's payload when a positive content length is known (from the SDK request headers or the publisher); otherwise keep the request bodiless, since falling back to a chunked entity would break SigV4 signing. - `Disallowed` methods (HEAD, TRACE, CONNECT) still never get an entity. - The content-length resolution and body source are factored into local helpers. ### Result GET and DELETE requests with payloads are sent with their bodies; bodiless GET/DELETE requests behave exactly as before. ### Tests - `sbt "aws-spi-pekko-http/Test/testOnly org.apache.pekko.stream.connectors.awsspi.PekkoHttpClientSpec"` — 15 passed, 4 new tests: DELETE and GET body attachment (both fail without the fix — verified by reverting the main source), plus tests pinning that a GET without content stays bodiless and that entity-disallowing methods never get a body - `sbt "aws-spi-pekko-http/Test/testOnly ...PekkoHttpClientH1TestSuite ...RequestRunnerSpec"` — 8 passed - `sbt "aws-spi-pekko-http/mimaReportBinaryIssues"` — no issues - `scalafmt --mode diff-ref=origin/main` — clean; no Java files changed, no new files (no header changes needed) ### References None - found during a review of the aws-spi-pekko-http client 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
