What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR?

Neither of these headers are officially standardised. Therefore: What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR? – it is impossible to say. Different proxies may implement these, or may not. The implementations may vary from one proxy to the next, and they may not. A lack of a standard breeds question marks. Why would one … Read more

Detect end of HTTP request body

Assuming you want your client to work with other servers, and server to work with other clients, your server can’t expect to be treated nicely. There are two ways to tell when the body has ended. Neither of them require knowledge of the body’s content type as you suggest (e.g., don’t bother looking for </html> … Read more