Query params are not sent with HTTP/2
ybasket opened this issue · comments
Yannick Heiber commented
When sending request using an ember client with HTTP/2 enabled, query params are omitted, the server doesn't receive them. Without HTTP/2, query params are sent as expected. Same when using the JDK http client.
Reproducer (scala-cli friendly): https://gist.github.com/ybasket/ab3b4eff4fa6bd58209054a94ddb1772
def run: IO[Unit] = EmberClientBuilder
.default[IO]
.withHttp2 // comment me to fix behaviour
.build
.use { client =>
client.expect[String](Request(uri = uri"https://httpbin.org/anything?foo=bar")).flatMap(IO.println)
}
Yannick Heiber commented
Looks like that bit is just missing in the implementation since at least http4s 0.23.14:
According to https://httpwg.org/specs/rfc7540.html#rfc.section.8.1.2.3, the query should be included in the :path
pseudo header. There's also a special handling of OPTIONS
in the RFC that is not implemented.