HTTP状态码308的处理方式是什么? [英] What's the deal with HTTP status code 308?

查看:2816
本文介绍了HTTP状态码308的处理方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IETF RFC草案超文本传输​​协议(HTTP)状态代码308(永久重定向)将HTTP状态308定义为永久重定向.当然,应该指出的是,这是一份文档草案,其文档标题中包含"Expires:2012年9月27日"文本,我认为这意味着现在应该认为该文本无效,但我并不熟悉对于IETF的流程,因此不要对此充满信心.

An IETF RFC draft The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect) defines HTTP status 308 as Permanent Redirect. It should, of course, be noted that this is a draft document and contains in its document header the text "Expires: September 27, 2012", which I presume would mean it should be considered invalid now, but I'm not familiar with IETF's processes and so don't feel confident about this.

Wikipedia文章 HTTP状态代码列表也使用308的定义,

The Wikipedia article List of HTTP status codes uses this definition of 308, also:

308永久重定向(批准为实验性 RFC ) [12]

308 Permanent Redirect (approved as experimental RFC)[12]

该请求以及以后所有的请求都应使用另一个URI进行重复. 307和308(如建议的那样)与302和301的行为并行,但是不允许更改HTTP方法.因此,例如,向永久重定向的资源提交表单可能会继续顺利进行.

The request, and all future requests should be repeated using another URI. 307 and 308 (as proposed) parallel the behaviours of 302 and 301, but do not allow the HTTP method to change. So, for example, submitting a form to a permanently redirected resource may continue smoothly.

...

[12]:"超文本传输​​协议(HTTP)状态代码308(永久重定向)" . IETF . 2012.检索于2012年3月27日.

[12]: "The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)". IETF. 2012. Retrieved March 27, 2012.

当时的Microsoft的Eric Law在

Eric Law, of Microsoft at the time, comments on this HTTP/308 code in Pushing the Web Forward with HTTP/308. That caused me to discover that Firefox supports 308 under this meaning.

但是,当我在库,我发现还有308的另一种用法:

However, when I was looking in the python-requests library, I found that there is another usage of 308:

    308: ('resume_incomplete', 'resume'),

这似乎来自Google Gears 可恢复的HTTP请求建议,它定义了308 Resume Incomplete.似乎有一些用法.当然,这些建议中没有一个承认另一个的存在.

This seems to come from a Google Gears resumable HTTP requests proposal, defining 308 Resume Incomplete. There seems to be some usage of that. Of course, neither of these proposals acknowledges the existence of the other.

那是怎么回事? 308 Permanent Redirect还活着吗?状态码308发生了什么?我该怎么办?

So what's going on? Is 308 Permanent Redirect alive? What's happening with the status code 308? What should I do?

推荐答案

Internet草案尚未过期(因为在过期之前已获得批准).参见 https://datatracker.ietf.org/doc/draft-reschke -http-status-308/ http ://www.rfc-editor.org/queue2.html#draft-reschke-http-status-308 了解当前的发布状态.

The Internet Draft has not expired (as it was approved before it expired). See https://datatracker.ietf.org/doc/draft-reschke-http-status-308/ and http://www.rfc-editor.org/queue2.html#draft-reschke-http-status-308 for the current publication status.

这篇关于HTTP状态码308的处理方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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