<p>I am writing a web server in Java and I want it to support HTTP 1.1 Keep-Alive connections. But how can I tell when the client is done sending requests for a given connection? (like a double end-of-line or something). </p>

<p>Lets see how stackoverflow handles this very obscure question -- answers for which, on Google, are mired in technical specifications and obscure language. I want a plain-english answer for a non-C programmer :)</p>

<hr>

<p>I see. that confirms my suspicion of having to rely on the SocketTimeoutException. But i wasn't sure if there was something i could rely on from the client that indicates it is done with the connection--which would allow me to close the connections sooner in most cases--instead of waiting for the timeout. Thanks</p>

You close it whenever you'd like.  The header indicates that the client would prefer you to leave the connection open, but that doesn't require the server to comply.  Most servers leave it open for about 5-10 seconds, some don't pay attention to it at all.