303 重定向
Last updated
2023-07-12 10:01:05
{"value":"**303 \u91cd\u5b9a\u5411**\u901a\u5e38\u662f\u5728\u901a\u8fc7\u6d4f\u89c8\u5668\u4e0a\u4f20\u7684\u573a\u666f\u4e2d\u4f7f\u7528\u3002\u6d4f\u89c8\u5668\u4e2d\u7684\u7f51\u9875\u53ef\u4ee5\u5728\u53d1\u8d77\u4e0a\u4f20\u8bf7\u6c42\u7684\u540c\u65f6\u901a\u77e5\u670d\u52a1\u5668\uff0c\u4e00\u65e6\u4e0a\u4f20\u6210\u529f\uff0c\u670d\u52a1\u5668\u5e94\u8be5\u8fd4\u56de HTTP 303 \u72b6\u6001\u7801\u5e76\u5e26\u4e0a\u4e00\u4e2a\u91cd\u5b9a\u5411 URL\u3002\u6d4f\u89c8\u5668\u5728\u6536\u5230\u670d\u52a1\u5668\u8fd4\u56de\u7684\u8fd9\u4e2a\u91cd\u5b9a\u5411 URL \u540e\uff0c\u5c06\u5f53\u524d\u9875\u9762\u8df3\u8f6c\u5230\u5bf9\u5e94\u9875\u9762\u3002\n\nHTTP 303 \u91cd\u5b9a\u5411\uff08\u53c2\u8003[RFC 2616 - 10.3.4](http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec10.html#sec10.3.4)\uff09\u662f HTTP 1.1 \u89c4\u8303\u7684\u7ec4\u6210\u90e8\u5206\u3002\u670d\u52a1\u5668\u53ef\u4ee5\u901a\u8fc7\u8fd4\u56de 303 \u72b6\u6001\u7801\u544a\u8bc9\u5ba2\u6237\u7aef\uff0c\u672c\u6b21\u8bf7\u6c42\u7684\u5185\u5bb9\u53ef\u4ee5\u901a\u8fc7\u8fd4\u56de\u7684\u8df3\u8f6c URL \u5f97\u5230\uff0c\u56e0\u6b64\u5ba2\u6237\u7aef\u5e94\u8be5\u91cd\u5b9a\u5411\u5230\u65b0\u7684 URL\u3002\u8be5\u6280\u672f\u88ab\u5e7f\u6cdb\u7528\u4e8e\u7f51\u9875\u5f00\u53d1\u9886\u57df\uff0c\u5982\u5728\u6587\u4ef6\u4e0a\u4f20\u5b8c\u6210\u540e\u8ba9\u5ba2\u6237\u7aef\u81ea\u52a8\u91cd\u5b9a\u5411\u5230\u4e00\u4e2a\u4e0a\u4f20\u6210\u529f\u7684\u7ed3\u679c\u9875\u9762\u3002\u79c1\u6709\u4e91\u5b58\u50a8\u7684\u8d44\u6e90\u4e0a\u4f20\u540e\u7eed\u52a8\u4f5c\u4e5f\u652f\u6301 303 \u91cd\u5b9a\u5411\u529f\u80fd\u3002\n\n\u5728\u6784\u9020\u4e0a\u4f20\u51ed\u8bc1\u65f6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u4e0a\u4f20\u7b56\u7565 (PutPolicy)\u4e2d\u7684 returnUrl \u53c2\u6570\u4ee5\u6fc0\u6d3b 303 \u91cd\u5b9a\u5411\u529f\u80fd\u3002\u5728\u6210\u529f\u5b8c\u6210\u4e0a\u4f20\u540e\uff0c\u670d\u52a1\u7aef\u4f1a\u5411\u5ba2\u6237\u7aef\u8fd4\u56de HTTP 303 \u72b6\u6001\u7801\uff0c\u5e76\u5728 Location \u5b57\u6bb5\u4e2d\u643a\u5e26\u4e0a\u4f20\u65f6\u6307\u5b9a\u7684\u91cd\u5b9a\u5411\u5730\u5740\u3002\u5982\u4e0b\u6240\u793a\uff1a\n\n```\nHTTP\/1.1 303 See Other\nLocation: <returnUrl>\n```\n\n\u5ba2\u6237\u7aef\u6536\u5230\u8fd9\u6837\u7684\u53cd\u9988\u540e\uff0c\u5e94\u6309 HTTP 1.1 \u6807\u51c6\u5c06\u5f53\u524d\u9875\u9762\u91cd\u5b9a\u5411\u5230 Location \u5b57\u6bb5\u6240\u6307\u5b9a\u7684 URL\u3002\u4e3b\u6d41\u6d4f\u89c8\u5668\u90fd\u652f\u6301\u8be5\u8df3\u8f6c\u64cd\u4f5c\u3002\n\n\u5982\u679c\u4e0a\u4f20\u7b56\u7565\u4e2d\u8fd8\u8bbe\u5b9a\u4e86\u81ea\u5b9a\u4e49\u8fd4\u56de\u5185\u5bb9 returnBody\uff0c\u5219\u670d\u52a1\u7aef\u8fd4\u56de\u7684 303 \u54cd\u5e94\u4e2d\u7684 Location \u5b57\u6bb5\u4e5f\u4f1a\u5305\u542b\u81ea\u5b9a\u4e49\u8fd4\u56de\u5185\u5bb9\u3002\u53c2\u6570\u503c\u91c7\u7528URL \u5b89\u5168\u7684 Base64 \u7f16\u7801\u3002\u6b64\u65f6\u7684\u54cd\u5e94\u5185\u5bb9\u5982\u4e0b\u6240\u793a\uff1a\n\n```\nHTTP\/1.1 303 See Other\nLocation: <returnUrl>?upload_ret=<encoded_return_body>\n```\n\n\u5982\u679c\u5e0c\u671b\u8fd4\u56de\u7684\u81ea\u5b9a\u4e49\u8fd4\u56de\u5185\u5bb9\u80fd\u5f97\u5230\u6b63\u786e\u5904\u7406\uff0c\u91cd\u5b9a\u5411 URL \u6240\u5bf9\u5e94\u7684\u670d\u52a1\u5668\u9700\u652f\u6301\u8bf7\u6c42\u53c2\u6570 upload_ret\u3002"}