pjfanning opened a new pull request, #1906: URL: https://github.com/apache/pekko-connectors/pull/1906
### Motivation `PekkoHttpClient.convertHeaders` rejected any request header carrying more than one value with an `IllegalArgumentException`. Repeated header fields are valid HTTP, and the AWS SDK models request headers as `Map[String, List[String]]` precisely because a name can carry multiple values, so such requests failed client-side before they were ever sent. ### Modification - Multi-value headers are now converted to one pekko-http header per value, preserving value order. - `Content-Length` and `Content-Type` stay strict (they are special-cased into the request entity) and still throw when they carry more than one value; a header with no values at all also still throws. - Header value parsing is factored into a `parseHeader` helper. ### Result Requests with legitimately repeated header fields are converted and sent instead of failing client-side; conflicting `Content-Length`/`Content-Type` values are still rejected. ### Tests - `sbt "aws-spi-pekko-http/Test/testOnly org.apache.pekko.stream.connectors.awsspi.PekkoHttpClientSpec"` — 15 passed, 4 new tests: multi-value conversion (fails without the fix — verified by reverting the main source), plus tests pinning the retained strictness for multi-value `Content-Length`, multi-value `Content-Type`, and empty value lists - `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]
