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
  • 41,371
  • 15
  • 229
  • 277

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
  • 29,618
  • 12
  • 101
  • 174