"Bad HTTP version" in blaze-client
See original GitHub issueWe are getting exceptions like below after trying to upgrade to v0.20.10.
Bad HTTP version: DSLU":
org.http4s.blaze.http.parser.BaseExceptions$BadMessage: Bad HTTP version: DSLU":
at org.http4s.blaze.http.parser.Http1ClientParser.parseResponseLine(Http1ClientParser.java:122) ~[blaze-http_2.12-0.14.8.jar:0.14.8]
at org.http4s.client.blaze.BlazeHttp1ClientParser.finishedResponseLine(BlazeHttp1ClientParser.scala:49) ~[http4s-blaze-client_2.12-0.20.10.jar:0.20.10]
at org.http4s.client.blaze.Http1Connection.parsePrelude(Http1Connection.scala:208) ~[http4s-blaze-client_2.12-0.20.10.jar:0.20.10]
at org.http4s.client.blaze.Http1Connection.$anonfun$readAndParsePrelude$1(Http1Connection.scala:189) ~[http4s-blaze-client_2.12-0.20.10.jar:0.20.10]
at org.http4s.client.blaze.Http1Connection.$anonfun$readAndParsePrelude$1$adapted(Http1Connection.scala:188) ~[http4s-blaze-client_2.12-0.20.10.jar:0.20.10]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60) [scala-library-2.12.1.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
After investigation it turns out to be caused by http4s/http4s#2458:
In my reproduction, curl
ing a particular request on v0.20.10 results in the above exception every other request, the other half goes ok. See https://gist.github.com/rintcius/f01dfe9e113458dbd0df530783cbddc2 for the error.log and ok.log. Using v0.20.10 with http4s/http4s#2458 reverted these requests return ok.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
"Bad HTTP version" in blaze-client · Issue #645
The website I'm trying to scrape serves content over HTTPS. In an attempt to debug this failure (that I could not reproduce in...
Read more >http4s/http4s - Gitter
In general I'd log the headers coming in to the http4s service and then look at the logic in CORS to see what's...
Read more >http4s - how create blaze client with limited count of threads?
There are two obvious things that are wrong with your code: you're creating an Executor without shutting it down when you're done.
Read more >ASM- Bad HTTP version
We have implemented ASM last day and many requests are blocked stating: Bad HTTP version. Version is 1.1 but still its blocked.
Read more >org.http4s.client.Client Scala Example
blockingThreadPool[F]("jbok-blaze-client"). ... HTTP/1.1` => HttpClient.Version.HTTP_1_1.pure[F] case HttpVersion.`HTTP/2.0` => HttpClient.Version.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I’ll work a bit on trying to reproduce, I do only a few simple queries, one after the others, but the service require a login so I’ll try to do it on another website.
Sorry, I forgot a bit about this. With the right loggers, it prints the following: