1

My scenario is the following:
A user agent is downloading a large file using the HTTP/1.1 transfer encoding: chunked. The status is 200 OK. During the download a server error occurs building the chunks. Is there a way to inform the user agent about the failure at http-level?

I am reading RFC 7230 section 4.1 (https://www.rfc-editor.org/rfc/rfc7230#section-4.1).
Currently my idea was to append the 0-chunk in case of an error and append the trailer which indicates a warning (https://www.rfc-editor.org/rfc/rfc7234#section-5.5). Does anyone knows if this could work and how the browser reacts?

Community
  • 1
  • 1
PeterP
  • 11
  • 2
  • 1
    Possible duplicate of [Abort HTTP chunk encoded response with Error Page](https://stackoverflow.com/questions/27018966/abort-http-chunk-encoded-response-with-error-page) – CodeCaster Jan 24 '19 at 15:25

1 Answers1

0

Browsers would ignore that.

AFAIU, the only thing you can do in this situation is to close the TCP connection.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98