302重定向到相对URL有效,还是无效? [英] Is a 302 Redirect to relative URL valid, or invalid?

查看:192
本文介绍了302重定向到相对URL有效,还是无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于RFC,似乎302响应中的位置字段应该是绝对的。
http://tools.ietf.org/html/rfc2616#section-14.30

Based on the RFC it seems like the Location field in an HTTP Response for a 302 should be absolute. http://tools.ietf.org/html/rfc2616#section-14.30

如果这个陈述是正确的,浏览器是否尊重这个 - 或者它们是否允许相对路径?

If this statement is correct, do browser honor this - or do they allow relative paths?

推荐答案

这是RFC 2616中的一个错误。请参阅 http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-17.html#rfc.section.9.5

That's a bug in RFC 2616. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-17.html#rfc.section.9.5.

这篇关于302重定向到相对URL有效,还是无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆