4

Can I send HTTP response before completely read HTTP request?

For example if user POST large file - exceed size limit or service send wrong header and we don't need to process rest of data and replay with HTTP error code?

UPDATE I finally found that this question had been already asked:

and it is possible but browser implementation are "broken" - doesn't take into account such event.

gavenkoa
  • 45,285
  • 19
  • 251
  • 303

1 Answers1

2

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

Yes, a server is allowed to do that by the specification.

No, clients don't handle it properly.

Community
  • 1
  • 1
Nickolay
  • 31,095
  • 13
  • 107
  • 185