I am trying to connect to legacy HTTP server and it seems to be NOT complaint to HTTP protocol, when providing response. As I cannot change the server so looking a way to get around. I have tried
httpResponse = httpclient.execute(httpPost);
httpResponse is null
BufferedReader reader = new BufferedReader(new InputStreamReader(httpConn.getInputStream(),"UTF8"));
java.io.IOException: Invalid Http response
I am trying to avoid opening a plain socket connection. Any other ways to read non-compliant HTTP response from any java HTTP client?