pjfanning opened a new pull request, #1224: URL: https://github.com/apache/pekko-http/pull/1224
### Motivation `1.4.x` is missing #1086 (`7def2274d`, on `main` since 2026-06-23), so a dozen call sites still lowercase/uppercase with the JVM default locale. Under a Turkish default locale (`tr-TR`) `'I'.toLowerCase` is a dotless `ı`, which breaks paths that compare against root-lowercased values: - `HttpHeader.parse` - header names containing a capital `I` (`If-Match`, `If-None-Match`, `If-Modified-Since`, `If-Unmodified-Since`, `If-Range`) fail to resolve to modelled headers and fall back to `RawHeader`. - `headerValueByName` - never matches such a header, producing a spurious `MissingHeaderRejection`. `optionalHeaderValueByName` in the same file already used `toRootLowerCase`. - `MediaTypes.forExtension` / `forExtensionOption` - extension lookup misses. - `MediaType.hashCode` - `equals` uses `equalsIgnoreCase` (locale independent) while `hashCode` was locale dependent, so equal instances could hash differently. - `overrideMethodWithParameter` - `"options"` uppercases to `OPTİONS` and yields `501 Not Implemented`. - `Uri` scheme normalization, `ErrorInfo.withErrorHeaderName`, `ignoreIllegalHeaderFor` (config and both DSL setters), the HTTP/2 frame-log alias lookup and the boolean unmarshaller. ### Modification Cherry-picked `7def2274d` onto `1.4.x`. The conflicts were confined to import blocks (`main` has since re-sorted imports in these files) and were resolved by keeping the `1.4.x` import order and adding `pekko.util.Helpers.toRootLowerCase`. The now-unused `java.util.Locale` import in `ConnectHttp.scala` was dropped, matching `main`. A second commit extends the existing `TurkishISpec` with regression cases, since #1086 landed without tests. ### Result `1.4.x` behaves identically to `main` for these paths regardless of the JVM default locale. ### Tests - `sbt "http-core / Test / testOnly org.apache.pekko.http.scaladsl.model.TurkishISpec"` - 5 passed (JDK 21). Against `1.4.x` without the cherry-picked commit, all 4 new cases fail. - `scalafmt --mode diff-ref=upstream/1.4.x` - clean. - `sbt +mimaReportBinaryIssues` - not run; the cherry-pick changes method bodies and imports only, with no public API or binary shape change (it is already on `main`). ### References Refs #1086 -- 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]
