Invalid Http response
See original GitHub issueIt seems to be an issue using @ClassRule
with https. If I run more than one test, then one of them will fail with the following exception:
Caused by: java.io.IOException: Invalid Http response
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1606)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253)
... 34 more
If I change the protocol to be http then the problem disappears.
Using @Rule
instead of @ClassRule
is another work around, but brings additional overhead.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >"Invalid Http response" on URLConnection.getInputStream ...
The most obvious reason is that you have different ssl/tls/cipher/certificate rules between your client and server.
Read more >How to Fix 400 Bad or Invalid Request HTTP Error? - WebNots
The 400 Bad or Invalid Request HTTP error could happen if your cookies are outdated or corrupted. Some browser extensions may change the...
Read more >Invalid http response · Issue #5469 · EOSIO/eos - GitHub
Whenever I am trying to set contract or create wallet/account the following error is showing- Error 3200002: invalid http response Error ...
Read more >Invalid HTTP response type - webMethods
Invalid HTTP response type ... any ideas? ... What is the HTTP response code returned? You should find that in the header returned...
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
@tqh actually it is a related issue. It would break some HTTP clients if the response contains both Transfer-Encoding and Content-Length headers. Upgrading to Hoverfly-Java 0.11.0 should fix it.
@mlundela, the Hoverfly-Java v0.11.0 release is available. It should fix the bug you raised.