Can I send an HTTP response before I read the entire HTTP request?

Is it possible to send an HTTP response before the HTTP request is fully read?

For example, if a custom POST large file exceeds the size limit or service, send the wrong header and we don't need to process the rest of the data and reproduce with an HTTP error code?

UPDATE Finally I found this question has already been asked:

and it is possible, but the browser implementation is "broken" - ignore this event.

+3


source to share


1 answer


Copying from @David Hodgson's answer from duplicate question here, so it doesn't look unanswered:

Yes, the server is allowed to do this by specification.



No, clients don't handle it properly.

+1


source







All Articles