URLConnection.getInputStream() - "Invalid HttpResponse" Exception JRE-1.7.0
883419Aug 22 2011 — edited Sep 7 2011The following code is throwing "java.io.IOException: Invalid Http response" when executed with few URLs in JRE 7.0
URL launchUrl = new URL("http://<URL>");
URLConnection uConn = launchUrl.openConnection();
uConn.getInputStream(); //The exception is thrown here
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at URLTest.main(URLTest.java:9)
The same code works fine when run from JRE 1.6.0_12.
The way java handles http request/response changed in JDK 7.0?
I the particular URL that is not working is present in GoAhead Webserver.