I am trying to use basic Java to read HTTP request data from an input stream using the following code:
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();
I get the header perfectly, but then the client just hangs forever, because the server never finds an "EOF" request. How can I handle this? I saw that this question was asked quite a lot, and most of the solutions are related to something like the above, however this does not work for me. I tried using both curl and the web browser as a client, just by sending a request for
Thanks for any ideas.
source share