您可以在分块的HTTP响应预告片中设置Location标头吗? [英] Can you set the Location header in a chunked http response trailer?
本文介绍了您可以在分块的HTTP响应预告片中设置Location标头吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HTTP 1.1响应可以分块(规范).在最后一块的末尾,服务器可以发送"trailer",其中包含其他头.
问题是:您可以在预告片中包含Location
标头,浏览器是否会通过重定向来做出反应?
解决方案
问题是,要工作的Location标头应使用特定的响应代码3xx,因此在标准响应中,您不能使用它,请参见spec). At the end of the last chunk the server can send a "trailer", which contains additional headers.
The question is: can you include a Location
header in the trailer, and will the browser react by making a redirect?
解决方案
The problem is that Location header to work should be with specific response code 3xx so in a standard response you can't use it see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
这篇关于您可以在分块的HTTP响应预告片中设置Location标头吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文