<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=HTTP_303</id>
	<title>HTTP 303 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=HTTP_303"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=HTTP_303&amp;action=history"/>
	<updated>2026-06-27T14:38:59Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=HTTP_303&amp;diff=2662655&amp;oldid=prev</id>
		<title>imported&gt;AnYiLin：​/* top */</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=HTTP_303&amp;diff=2662655&amp;oldid=prev"/>
		<updated>2021-09-07T15:22:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NoteTA|G1=IT}}&lt;br /&gt;
{{HTTP}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HTTP 303 See Other&amp;#039;&amp;#039;&amp;#039; ，自 RFC 2616（HTTP 1.1）起，用于在收到[[HTTP POST]]请求之后，进行[[URL重定向]]的操作。&amp;lt;ref&amp;gt;{{cite web|url=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html|title=W3C: 10 Status Code Definitions|accessdate=2016-01-21|archive-date=2010-03-16|archive-url=https://web.archive.org/web/20100316011642/http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html|dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 引入==&lt;br /&gt;
虽然&amp;lt;nowiki/&amp;gt;RFC 1945&amp;lt;nowiki/&amp;gt;和&amp;lt;nowiki/&amp;gt;RFC 2068&amp;lt;nowiki/&amp;gt;规范不允许客户端在重定向时改变请求的方法，但是很多现存的浏览器在收到302响应时，直接使用GET方式访问在Location中规定的URI，而无视原先请求的方法。&amp;lt;ref name=&amp;quot;ruby-on-rails-ActionController-Redirecting-redirect_to&amp;quot;&amp;gt;{{cite web|url = http://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_to|title = Reference of method redirect_to in Ruby Web Framework &amp;quot;Ruby on Rails&amp;quot;. It states: The redirection happens as a &amp;quot;302 Moved&amp;quot; header unless otherwise specified.|accessdate = June 30, 2012|archive-date = 2012-07-05|archive-url = https://web.archive.org/web/20120705235048/http://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_to|dead-url = yes}}&amp;lt;/ref&amp;gt;因此状态码303被添加了进来，用以明确服务器期待客户端进行何种反应。&amp;lt;ref name=&amp;quot;RFC7230-10&amp;quot;&amp;gt;{{cite web|url = http://tools.ietf.org/html/rfc7231#section-6.4|title = Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content, Section 6.4|publisher = [[IETF]]|accessdate = June 12, 2014|archive-date = 2017-05-25|archive-url = https://web.archive.org/web/20170525004653/https://tools.ietf.org/html/rfc7231#section-6.4|dead-url = no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 定义==&lt;br /&gt;
根据[//tools.ietf.org/html/rfc2616#section-10.3.4 RFC 2616]定义:&lt;br /&gt;
* 此方法主要用于允许在收到POST方法后响应时，将用户重定向到所选资源。&lt;br /&gt;
* 如果一个客户端有链接编辑能力，其应当把所有的引用链接重定向到新的URL上。&lt;br /&gt;
* 重定向到新地址时，客户端必须使用GET方法请求新地址。&lt;br /&gt;
* 客户端收到的新的URI，不是原始请求资源的替代引用。&lt;br /&gt;
* 该响应码不应被客户端缓存，惟重定向后的页面不受此限。&lt;br /&gt;
* 除非请求方法是 HEAD, 否则响应实体应该包含一个小型的超文本，标注一个超链接到新的URL。&lt;br /&gt;
&lt;br /&gt;
== 示例 ==&lt;br /&gt;
客户端请求:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /blog/comment HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
Content-Type:application/x-www-form-urlencoded; charset=UTF-8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
服务器回应:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.1 303 See Other&lt;br /&gt;
Location: http://www.example.org/view-comment.asp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==参见==&lt;br /&gt;
* [[HTTP]]&lt;br /&gt;
* [[HTTP狀態碼]]&lt;br /&gt;
* [[URL重寫]]&lt;br /&gt;
* [[HTTP 301]]&lt;br /&gt;
* [[HTTP 302]]&lt;br /&gt;
* [[HTTP 307]]&lt;br /&gt;
&lt;br /&gt;
==参考文献==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 外部連結 ==&lt;br /&gt;
* [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html HTTP/1.1 Error codes in RFC 2616]{{Wayback|url=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html |date=20100316011642 }} {{en icon}}&lt;br /&gt;
* RFC 1945 (HTTP 1.0)&lt;br /&gt;
* RFC 7231 (HTTP 1.1)&lt;br /&gt;
&lt;br /&gt;
[[Category:HTTP]]&lt;br /&gt;
[[Category:计算机错误]]&lt;br /&gt;
[[Category:網路術語]]&lt;/div&gt;</summary>
		<author><name>imported&gt;AnYiLin</name></author>
	</entry>
</feed>