I'm building a proxy.. but I have a small doubt.
I connect to the remote server, and send the request. Then I start reading from the socket... When do I know that the server sent all the info I asked?? Should I used the Content-length header? or should I wait for the server to close the connection?
The same when I reading a request of a client.

plus, what is the Proxy-Connection suposed to mean ?