getForKeyCaseInsensitive
not working on HttpMethods
.
#2303
Labels
1 - triaged
Tickets that are safe to pick up for contributing in terms of likeliness of being accepted
help wanted
Identifies issues that the core team will likely not have time to work on
Milestone
HttpMethods.getForKeyCaseInsensitive("POST")
givesNone
, should beSome(HttpMethod(GET))
The reason is that when
HttpMethods
registers its members it uses upper case keysakka-http/akka-http-core/src/main/scala/akka/http/scaladsl/model/HttpMethod.scala
Line 57 in 240d9ac
... but when invoking
getForKeyCaseInsensitive
under the hood it appliestoRootLowerCase
on keyakka-http/akka-http-core/src/main/scala/akka/http/impl/util/ObjectRegistry.scala
Line 27 in 240d9ac
My recommendations are either store keys in lower case or override
getForKeyCaseInsensitive
and replacetoRootLowerCase
withtoUpperCase(Locale.ROOT)
The text was updated successfully, but these errors were encountered: