HTTP Chunked Response Error Handling

I am creating a web application that chunk outputs back to the client in Java netty.

I read and searched the Internet and found the following resources:

and to summarize, I am convinced that the headers of trailers with "Location" should be respected regardless of the HTTP response and previous headers.

However, after some Blackbox tests in Firefox and Chrome. None of the browsers respect the final title.

So my question is:

  • First of all, did I miss something?
  • Secondly, what would be the ideal solution for fixing errors in a block answer?
    • Currently, I only know about using javascripts in the middle of the answer.
  • and finally, I am mistaken in believing that the headers of the HTTP addresses should be respected regardless of the HTTP response code? The specs linked above didn't mention that it should be 3xx headers and actually mentioned 201 headers as a possible case for a location, but none of the major browsers respect it.
+4
source share
1 answer

First of all, UA (AFAIK) do not support trailers.

Secondly, location semantics depend on the status code. What do you think should happen to the Location header field with a status of 200 ???

0
source

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


All Articles