title: Reading request content from Java socket InputStream, always hangs after header
body: <p>I am trying to use core Java to read HTTP request data from an inputstream, using the following code:</p>
  
  <pre><code>BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              String inputLine;
              while ((inputLine = in.readLine()) != null)
                  System.out.println(inputLine);
              in.close();
  </code></pre>
  
  <p>I receive the header fine, but then the client just hangs forever because the server never finds "EOF" of the request. How do I handle this? I've seen this question asked quite a bit, and most solutions involve something like the above, however it's not working for me. I've tried using both curl and a web browser as the client, just sending a get request</p>
  
  <p>Thanks for any ideas </p>