{"id":47098,"date":"2024-10-07T11:23:15","date_gmt":"2024-10-07T03:23:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/47098\/"},"modified":"2024-10-07T11:23:15","modified_gmt":"2024-10-07T03:23:15","slug":"iis%e7%8b%80%e6%85%8b%e7%a2%bc-206-partial-content%ef%bc%88%e9%83%a8%e5%88%86%e5%85%a7%e5%ae%b9%ef%bc%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/47098\/","title":{"rendered":"IIS\u72c0\u614b\u78bc &#8211; 206 Partial Content\uff08\u90e8\u5206\u5167\u5bb9\uff09"},"content":{"rendered":"<h1 id=\"iis%e7%8b%80%e6%85%8b%e7%a2%bc-206-partial-content%ef%bc%88%e9%83%a8%e5%88%86%e5%85%a7%e5%ae%b9%ef%bc%89-NTnONNzOdt\">IIS\u72c0\u614b\u78bc &#8211; 206 Partial Content\uff08\u90e8\u5206\u5167\u5bb9\uff09<\/h1>\n<p>\u5728\u7db2\u7d61\u901a\u4fe1\u4e2d\uff0cHTTP\u72c0\u614b\u78bc\u662f\u7528\u4f86\u8868\u793a\u4f3a\u670d\u5668\u5c0d\u5ba2\u6236\u7aef\u8acb\u6c42\u7684\u97ff\u61c9\u72c0\u614b\u7684\u91cd\u8981\u6307\u6a19\u3002\u9019\u4e9b\u72c0\u614b\u78bc\u53ef\u4ee5\u5e6b\u52a9\u958b\u767c\u8005\u548c\u7cfb\u7d71\u7ba1\u7406\u54e1\u4e86\u89e3\u8acb\u6c42\u7684\u7d50\u679c\u4ee5\u53ca\u53ef\u80fd\u51fa\u73fe\u7684\u554f\u984c\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eIIS\u72c0\u614b\u78bc206 Partial Content\uff08\u90e8\u5206\u5167\u5bb9\uff09\uff0c\u4e26\u5206\u6790\u5176\u7528\u9014\u3001\u5be6\u73fe\u65b9\u5f0f\u53ca\u76f8\u95dc\u793a\u4f8b\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af206-partial-content%ef%bc%9f-NTnONNzOdt\">\u4ec0\u9ebc\u662f206 Partial Content\uff1f<\/h2>\n<p>HTTP\u72c0\u614b\u78bc206 Partial Content\u8868\u793a\u4f3a\u670d\u5668\u6210\u529f\u8655\u7406\u4e86\u90e8\u5206\u8acb\u6c42\u3002\u9019\u901a\u5e38\u767c\u751f\u5728\u5ba2\u6236\u7aef\u4f7f\u7528\u4e86\u7bc4\u570d\u8acb\u6c42\uff08Range Request\uff09\uff0c\u5373\u5ba2\u6236\u7aef\u5e0c\u671b\u5f9e\u8cc7\u6e90\u4e2d\u7372\u53d6\u7279\u5b9a\u7684\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u6574\u500b\u8cc7\u6e90\u3002\u9019\u5728\u8655\u7406\u5927\u578b\u6587\u4ef6\uff08\u5982\u8996\u983b\u3001\u97f3\u983b\u6216\u5927\u578b\u6587\u6a94\uff09\u6642\u7279\u5225\u6709\u7528\uff0c\u56e0\u70ba\u5b83\u53ef\u4ee5\u6e1b\u5c11\u5e36\u5bec\u7684\u4f7f\u7528\u4e26\u63d0\u9ad8\u52a0\u8f09\u901f\u5ea6\u3002<\/p>\n<h2 id=\"%e7%af%84%e5%9c%8d%e8%ab%8b%e6%b1%82%e7%9a%84%e5%b7%a5%e4%bd%9c%e5%8e%9f%e7%90%86-NTnONNzOdt\">\u7bc4\u570d\u8acb\u6c42\u7684\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>\u7bc4\u570d\u8acb\u6c42\u662f\u901a\u904eHTTP\u6a19\u982d\u4e2d\u7684\u201cRange\u201d\u5b57\u6bb5\u4f86\u5be6\u73fe\u7684\u3002\u7576\u5ba2\u6236\u7aef\u767c\u9001\u8acb\u6c42\u6642\uff0c\u53ef\u4ee5\u6307\u5b9a\u6240\u9700\u7684\u5b57\u7bc0\u7bc4\u570d\u3002\u4f8b\u5982\uff0c\u5ba2\u6236\u7aef\u53ef\u4ee5\u767c\u9001\u4ee5\u4e0b\u8acb\u6c42\uff1a<\/p>\n<pre><code>GET \/example.mp4 HTTP\/1.1\nHost: www.example.com\nRange: bytes=0-499<\/code><\/pre>\n<p>\u9019\u8868\u793a\u5ba2\u6236\u7aef\u5e0c\u671b\u7372\u53d6example.mp4\u6587\u4ef6\u7684\u524d500\u500b\u5b57\u7bc0\u3002\u5982\u679c\u4f3a\u670d\u5668\u652f\u6301\u7bc4\u570d\u8acb\u6c42\uff0c\u5247\u6703\u8fd4\u56de206 Partial Content\u72c0\u614b\u78bc\uff0c\u4e26\u5728\u97ff\u61c9\u4e2d\u5305\u542b\u6240\u8acb\u6c42\u7684\u5b57\u7bc0\u7bc4\u570d\u3002<\/p>\n<h2 id=\"206-partial-content%e7%9a%84%e9%9f%bf%e6%87%89%e6%a0%bc%e5%bc%8f-NTnONNzOdt\">206 Partial Content\u7684\u97ff\u61c9\u683c\u5f0f<\/h2>\n<p>\u7576\u4f3a\u670d\u5668\u8fd4\u56de206 Partial Content\u6642\uff0c\u97ff\u61c9\u4e2d\u6703\u5305\u542b\u4ee5\u4e0b\u5e7e\u500b\u91cd\u8981\u7684HTTP\u6a19\u982d\uff1a<\/p>\n<ul>\n<li><strong>Content-Range:<\/strong> \u6307\u5b9a\u8fd4\u56de\u7684\u5b57\u7bc0\u7bc4\u570d\u3002\u4f8b\u5982\uff1a<code>Content-Range: bytes 0-499\/1234<\/code>\uff0c\u9019\u8868\u793a\u8fd4\u56de\u7684\u5b57\u7bc0\u7bc4\u570d\u662f0\u5230499\uff0c\u4e26\u4e14\u6574\u500b\u8cc7\u6e90\u7684\u5927\u5c0f\u70ba1234\u5b57\u7bc0\u3002<\/li>\n<li><strong>Content-Length:<\/strong> \u8fd4\u56de\u7684\u5167\u5bb9\u9577\u5ea6\uff0c\u9019\u88e1\u662f500\u5b57\u7bc0\u3002<\/li>\n<li><strong>Content-Type:<\/strong> \u8fd4\u56de\u5167\u5bb9\u7684MIME\u985e\u578b\uff0c\u4f8b\u5982\uff1a<code>Content-Type: video\/mp4<\/code>\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u662f\u4e00\u500b\u793a\u4f8b\u97ff\u61c9\uff1a<\/p>\n<pre><code>HTTP\/1.1 206 Partial Content\nContent-Range: bytes 0-499\/1234\nContent-Length: 500\nContent-Type: video\/mp4\n\n[\u524d500\u500b\u5b57\u7bc0\u7684\u6578\u64da]<\/code><\/pre>\n<h2 id=\"%e4%bd%bf%e7%94%a8%e5%a0%b4%e6%99%af-NTnONNzOdt\">\u4f7f\u7528\u5834\u666f<\/h2>\n<p>206 Partial Content\u72c0\u614b\u78bc\u7684\u4f7f\u7528\u5834\u666f\u4e3b\u8981\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u8996\u983b\u6d41\u5a92\u9ad4\uff1a<\/strong>\u7528\u6236\u5728\u89c0\u770b\u8996\u983b\u6642\uff0c\u53ef\u80fd\u53ea\u9700\u8981\u52a0\u8f09\u7576\u524d\u64ad\u653e\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u6574\u500b\u8996\u983b\u6587\u4ef6\u3002<\/li>\n<li><strong>\u4e0b\u8f09\u7ba1\u7406\u5668\uff1a<\/strong>\u4e0b\u8f09\u7ba1\u7406\u5668\u53ef\u4ee5\u4f7f\u7528\u7bc4\u570d\u8acb\u6c42\u4f86\u5be6\u73fe\u65b7\u9ede\u7e8c\u50b3\uff0c\u5f9e\u800c\u63d0\u9ad8\u4e0b\u8f09\u6548\u7387\u3002<\/li>\n<li><strong>\u5927\u6587\u4ef6\u50b3\u8f38\uff1a<\/strong>\u5728\u50b3\u8f38\u5927\u578b\u6587\u4ef6\u6642\uff0c\u4f7f\u7528\u7bc4\u570d\u8acb\u6c42\u53ef\u4ee5\u6e1b\u5c11\u5e36\u5bec\u6d88\u8017\uff0c\u4e26\u63d0\u9ad8\u7528\u6236\u9ad4\u9a57\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-NTnONNzOdt\">\u6ce8\u610f\u4e8b\u9805<\/h2>\n<p>\u96d6\u7136206 Partial Content\u63d0\u4f9b\u4e86\u8a31\u591a\u512a\u52e2\uff0c\u4f46\u5728\u5be6\u73fe\u6642\u4e5f\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u4f3a\u670d\u5668\u5fc5\u9808\u6b63\u78ba\u8655\u7406\u7bc4\u570d\u8acb\u6c42\uff0c\u4e26\u8fd4\u56de\u6b63\u78ba\u7684Content-Range\u6a19\u982d\u3002<\/li>\n<li>\u5982\u679c\u8acb\u6c42\u7684\u7bc4\u570d\u7121\u6548\uff0c\u4f3a\u670d\u5668\u61c9\u8fd4\u56de416 Range Not Satisfiable\u72c0\u614b\u78bc\u3002<\/li>\n<li>\u78ba\u4fdd\u4f3a\u670d\u5668\u7684\u6027\u80fd\u80fd\u5920\u652f\u6301\u591a\u500b\u7bc4\u570d\u8acb\u6c42\uff0c\u7279\u5225\u662f\u5728\u9ad8\u6d41\u91cf\u7684\u60c5\u6cc1\u4e0b\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-NTnONNzOdt\">\u7e3d\u7d50<\/h2>\n<p>IIS\u72c0\u614b\u78bc206 Partial Content\u662f\u4e00\u500b\u91cd\u8981\u7684HTTP\u97ff\u61c9\u78bc\uff0c\u80fd\u5920\u6709\u6548\u5730\u652f\u6301\u7bc4\u570d\u8acb\u6c42\uff0c\u5f9e\u800c\u63d0\u9ad8\u7528\u6236\u5728\u8655\u7406\u5927\u578b\u6587\u4ef6\u6642\u7684\u9ad4\u9a57\u3002\u901a\u904e\u6b63\u78ba\u5be6\u73fe\u7bc4\u570d\u8acb\u6c42\uff0c\u4f3a\u670d\u5668\u53ef\u4ee5\u66f4\u9748\u6d3b\u5730\u7ba1\u7406\u8cc7\u6e90\uff0c\u4e26\u512a\u5316\u5e36\u5bec\u4f7f\u7528\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u6587\u4ef6\u50b3\u8f38\u7684\u61c9\u7528\u5834\u666f\uff0c\u4e86\u89e3\u548c\u4f7f\u7528206 Partial Content\u72c0\u614b\u78bc\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bcVPS\u3001<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216\u5176\u4ed6\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\u6709\u8208\u8da3\uff0c\u6b61\u8fce\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8cc7\u8a0a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3IIS\u72c0\u614b\u78bc206 Partial Content\uff0c\u8a72\u78bc\u8868\u793a\u4f3a\u670d\u5668\u6210\u529f\u56de\u61c9\u90e8\u5206\u8acb\u6c42\uff0c\u9069\u7528\u65bc\u5206\u6bb5\u4e0b\u8f09\u548c\u6d41\u5a92\u9ad4\u50b3\u8f38\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-47098","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=47098"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47098\/revisions"}],"predecessor-version":[{"id":47099,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47098\/revisions\/47099"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=47098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=47098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=47098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}