I'm not awfully knowledgeable about HTTP, but my understanding is that an HTTP request consists of a bunch of headers and then the body.
Is it possible for PHP to receive the request headers, make a decision based on what's been received, and then either abort the request or continue to accept the body?
This would be useful when receiving an uploaded file which is very large. I could therefore avoid the user wasting time in uploading a huge file only to discover the server won't accept it (file exists already). I know I could send a separate XHR request to do this, but I want to know if it's possible without that.
So, in short, can PHP cancel an HTTP Request after receiving only the headers?