HTTP状态码308的处理方式是什么?

编程入门 行业动态 更新时间:2024-10-27 17:13:40
本文介绍了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在使用HTTP/308 推动网络向前.这使我发现Firefox在这种意义下支持308.

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.

但是,当我在 python-requests 库,我发现还有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草案尚未过期(因为在过期之前已获得批准).参见 datatracker.ietf/doc/draft-reschke -http-status-308/和 http ://www.rfc-editor/queue2.html#draft-reschke-http-status-308 了解当前的发布状态.

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

更多推荐

HTTP状态码308的处理方式是什么?

本文发布于:2023-11-16 11:07:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603725.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:状态   方式   HTTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!