Does the error code redirect when you return a response with encoded encoding?

My web application uses coded encoding. I would like to have a behavior where, if any fragment generates an error, I can correctly set the error code and redirect to the error page using this. Right now, it looks like this can only happen if the error occurs during the first fragment, because the response headers must be sent in the first fragment. Is there a way to make this work or get the behavior I want? Thanks.

+3
source share
1 answer

The HTTP specification allows you to provide additional headers as a β€œtrailer” after your last snippet, which should be handled the same way as the headers at the top of the response:

http://tools.ietf.org/html/rfc2616#section-3.6.1

Here is an example:

http://www.jmarshall.com/easy/http/#http1.1c2

+3
source

Source: https://habr.com/ru/post/1382418/


All Articles