The GitHub Actions job "CI" on 
pekko-connectors.git/aws-spi-content-type-fallback has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
84f0ac7b62cdf68f3774a67af9b673fd5544f5d8 / PJ Fanning 
<[email protected]>
AWS SPI: preserve content-type parameters and drop unreachable map entry

Motivation:
tryCreateCustomContentType split content-type values only on '/', so a
value with parameters (e.g. "text/plain; charset=UTF-8") produced a
custom binary media type whose subtype embedded the parameters
("plain; charset=UTF-8") instead of a properly modeled ContentType.
The contentTypeMap also carried an entry keyed
"application/x-www-form-urlencoded; charset-UTF-8" (typo: '-' instead
of '='); the key is unreachable either way because the lookup value is
the re-rendered parsed Content-Type header, and pekko-http renders the
fixed-charset form-urlencoded media type without a charset parameter.

Modification:
tryCreateCustomContentType now tries ContentType.parse first and only
falls back to the legacy '/'-split custom binary media type when proper
parsing fails. Remove the unreachable typo'd map entry with a comment
explaining why no charset-suffixed key is needed.

Result:
Content-type values with parameters keep their parameters in the
request entity's ContentType; unparseable values retain the previous
fallback behavior.

Tests:
- sbt "aws-spi-pekko-http/Test/testOnly 
org.apache.pekko.stream.connectors.awsspi.PekkoHttpClientSpec" - 14 passed (3 
new tests); the parameters-preservation test fails without the fix (verified)
- sbt "aws-spi-pekko-http/mimaReportBinaryIssues" - no issues
- scalafmt --mode diff-ref=origin/main - clean

References:
None - found during a review of the aws-spi-pekko-http client

Report URL: https://github.com/apache/pekko-connectors/actions/runs/36856221895

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to