{"id":155685,"date":"2020-09-08T03:57:37","date_gmt":"2020-09-07T19:57:37","guid":{"rendered":"http:\/\/4563.org\/?p=155685"},"modified":"2020-09-08T03:57:37","modified_gmt":"2020-09-07T19:57:37","slug":"%e4%bb%8e%e9%98%bf%e9%87%8c%e4%ba%91-oss-%e4%b8%8b%e8%bd%bd%e6%96%87%e4%bb%b6%ef%bc%8c%e6%96%87%e4%bb%b6%e5%b1%85%e7%84%b6%e6%8d%9f%e5%9d%8f%e4%ba%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=155685","title":{"rendered":"\u4ece\u963f\u91cc\u4e91 oss \u4e0b\u8f7d\u6587\u4ef6\uff0c\u6587\u4ef6\u5c45\u7136\u635f\u574f\u4e86"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4ece\u963f\u91cc\u4e91 oss \u4e0b\u8f7d\u6587\u4ef6\uff0c\u6587\u4ef6\u5c45\u7136\u635f\u574f\u4e86               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wty <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u76ee\u524d\u6d4b\u51fa\u7528 axel \u591a\u7ebf\u7a0b\uff08\u5f00\u4e86 4 \u7ebf\u7a0b\uff09\u4e0b\u8f7d\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\uff0cchrome \u548c ossutil \u4e0b\u8f7d\u7684\u6ca1\u95ee\u9898<\/p>\n<p>\u5bf9\u6bd4\u4e86\u4e00\u4e0b\u6587\u4ef6\u5185\u5bb9\uff0c\u51fa\u9519\u7684\u6587\u4ef6\u540e\u9762\u6709\u90e8\u5206\u53d8\u6210\u4ece\u5934\u5f00\u59cb\u4e0b\u8f7d\u7684\u4e86\uff0c\u5e76\u4e14\u4e0d\u6b62\u4ece\u5934\u5f00\u59cb\u4e86\u4e00\u6b21\u3002\u6700\u7ec8\u4e0b\u8f7d\u4e0b\u6765\u7684\u6587\u4ef6\u5927\u5c0f\u76f8\u540c\u3002<\/p>\n<p>\u53e6\u5916\u624b\u673a app \u91cc\u9762\u770b\u89c1\u7684\u6587\u4ef6\u5927\u5c0f\u5c45\u7136\u662f\u9519\u7684,\u7591\u4f3c\u5355\u4f4d\u6362\u7b97\u7528\u4e86 1000 \u9664\u3002\u7f51\u9875\u7248\u91cc\u7684\u5012\u662f\u5bf9\u7684\u3002<\/p>\n<p>\uff08\u611f\u89c9\u5b9e\u5728\u662f\u592a\u626f\u6de1\u4e86\uff0c\u8fd9 bug \u6709\u70b9\u591a\u554a\u3002\u3002\u3002\uff09<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3300139\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wtks1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 aria2 \u7684\u591a\u7ebf\u7a0b\u8bd5\u8bd5\uff1f\u76ee\u524d\u5df2\u77e5 axel \u5728\u4e0b\u8f7d\u67d0\u4e9b\u94fe\u63a5\u7684\u65f6\u5019\u65e0\u6cd5\u8ffd\u8e2a\u591a\u6b21\u8df3\u8f6c\u7684\u5730\u5740\uff0c\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u8fd9\u4e2a\u95ee\u9898\u5bfc\u81f4\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300140\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whileFalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u624b\u673a app \u662f\u4ec0\u4e48 app                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300141\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @whileFalse \u5c31\u662f\u53eb \u963f\u91cc\u4e91 \u7684\u90a3\u4e2a app                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300142\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abo321 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u60a8\u597d\u3002\u611f\u8c22\u60a8\u4f7f\u7528 OSS \u548c\u53cd\u9988\u3002<\/p>\n<p>\u9488\u5bf9\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u672c\u5730\u4f7f\u7528 axel \u5de5\u5177\u505a\u4e86\u6d4b\u8bd5\uff0c\u7248\u672c\u4e3a 2.16.1\uff0cos \u4e3a ubuntu \u3002\u5206\u522b\u901a\u8fc7 axel \u548c curl \u5bf9\u4e0b\u8f7d\u7684\u6570\u636e\u505a md5 \u5bf9\u6bd4\uff0c\u5176\u503c\u90fd\u662f\u4e00\u6837\u7684\u3002<\/p>\n<p>\u5177\u4f53\u7684\u6d4b\u8bd5\u5982\u4e0b\uff0c<\/p>\n<p>===================<\/p>\n<p>\u6d4b\u8bd5\u547d\u4ee4 axel -n 4 -o axel-download-2.data http:\/\/skyranch-02.oss-cn-hangzhou.aliyuncs.com\/curl.zip 4 \u4e2a\u7ebf\u7a0b\u540c\u65f6\u4e0b\u8f7d\u3002<\/p>\n<p>\u6293\u5305\u540e\uff0c\u770b\u5230\u4e00\u5171\u6709 5 \u4e2a Get \u8bf7\u6c42<br \/>(1) GET \/curl.zip Range: bytes=1- \u8fd4\u56de Content-Length: 330978 \uff0c \u62a5\u6587\u7684\u6570\u636e\u53ea\u8fd4\u56de\u4e86\u5dee\u4e0d\u591a 0x446C \u6570\u636e <br \/>(2) GET \/curl.zip bytes=165489-248233 \u8fd4\u56de Content-Length: 82745 \uff0c <br \/>(3) GET \/curl.zip  \u8fd4\u56de Content-Length: 330979 \uff0c \u62a5\u6587\u7684\u6570\u636e\u53ea\u8fd4\u56de\u4e86\u5dee\u4e0d\u591a 0x2958c \uff08 169556 \uff09 \u6570\u636e\uff0c \u6db5\u76d6 0- 165489 \u8303\u56f4 <br \/>(4) GET \/curl.zip bytes=248234-330978 \u8fd4\u56de Content-Length: 82745<br \/>(5) GET \/curl.zip bytes=82744-165488 \u8fd4\u56de Content-Length: 82745<\/p>\n<p>\u6d4b\u8bd5\u6587\u4ef6\u957f\u5ea6\u4e3a 330979\uff0c330979\/4 = 82744.75 \uff0c\u5206\u6bb5\u4e3a 82745\uff0c \u5206\u522b\u901a\u8fc7 axel \u548c curl \u5bf9\u4e0b\u8f7d\u7684\u6570\u636e\u505a md5 \u5bf9\u6bd4\uff0c\u5176\u503c\u90fd\u662f\u4e00\u6837\u7684\u3002<\/p>\n<p>\u5927\u6982\u63a8\u51fa\uff0c\u8fd9\u4e2a\u5de5\u5177\u7684\u505a\u6cd5\uff1a<br \/>(1) \u8bf7\u6c42\u4e3a\u83b7\u53d6\u5230 \u6587\u4ef6\u7684 \u5927\u5c0f\u3002\u901a\u8fc7 ranget 1- \u6a21\u5f0f\u83b7\u53d6 \u6587\u4ef6\u5927\u5c0f \u6bd4 head object \u66f4\u5177\u6709\u901a\u7528\u6027<br \/>(2) &#8211; (5) \u4e3a \u591a\u7ebf\u7a0b\u8bf7\u6c42\uff0c\u6b63\u597d\u6709 4 \u4e2a\u5e76\u53d1 \u8bf7\u6c42\uff0c\u6700\u5f00\u59cb\u7684\u8bf7\u6c42 \u901a\u8fc7\u975e range \u65b9\u5f0f\u8bf7\u6c42\uff0c\u8bfb\u6570\u636e\u65f6\uff0c\u53ea\u8bfb \u9700\u8981\u7684\u90e8\u5206\u3002\u5176\u5b83\u5e76\u53d1\u6309\u7167 \u5206\u7247\u5927\u5c0f\u8bf7\u6c42\u3002<\/p>\n<p>===================<\/p>\n<p>\u60f3\u548c\u60a8\u786e\u8ba4\u4e0b\uff0c\u60a8\u4f7f\u7528\u7684 axel \u5de5\u5177\u662f\u4ec0\u4e48\u7248\u672c\uff0c \u6d4b\u8bd5\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u4ee5\u53ca \u7528\u5230\u7684 axel \u662f\u4e0d\u662f \u540c\u4e00\u4e2a\uff1f<\/p>\n<p>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u53cd\u9988\uff01                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300143\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @abo321 \u60a8\u597d\uff0c\u6211\u7528\u7684\u662f Axel 2.17.9, wsl2 \u91cc\u7684 ubuntu2004<\/p>\n<p>\u6211\u4e5f\u8bd5\u4e86\u4e00\u4e0b 2.16.1 \u7248\u672c\uff0c\u662f\u6b63\u5e38\u5de5\u4f5c\u7684\uff0c\u6293\u5305\u53d1\u73b0\u8bf7\u6c42\u4e0d\u592a\u4e00\u6837\uff0c<\/p>\n<p>16 \u7248\u672c\u7b2c\u4e00\u4e2a\u8bf7\u6c42 range \u662f 1- \uff0c17 \u7248\u672c\u662f 0- \uff08\u8fd9\u70b9\u4f3c\u4e4e\u6ca1\u6709\u5f71\u54cd\uff09\uff0c17 \u7248\u672c\u7684\u6bcf\u4e2a\u4e0b\u8f7d\u8bf7\u6c42\u90fd\u6709 range \u53c2\u6570\u3002<\/p>\n<p>\u95ee\u9898\u51fa\u5728\u4e0b\u8f7d\u6700\u540e\u4e00\u4e2a part \u4e0a\uff0c\u5bf9\u4e00\u4e2a 336700 \u5b57\u8282\u7684\u6587\u4ef6\uff0c16 \u7248\u672c\u7684 range \u662f 252527-336699\uff0c17 \u7248\u672c 280583-336700 \uff08\u4f30\u8ba1\u662f\u4ee3\u7801\u5199\u9519\u4e86\uff09\uff0coss \u5bf9\u4e8e\u8fd9\u79cd\u8bf7\u6c42\u5904\u7406\u662f\u5ffd\u7565 range \u9879\uff0c\u4ece\u5934\u5f00\u59cb\u8bfb\uff0c\u8fd4\u56de http200 \u3002<\/p>\n<p>\u4f46\u662f\u6839\u636e RFC2616 138 \u9875\u7684\u8bf4\u6cd5\uff0c\u670d\u52a1\u5668\u5e94\u8be5\u662f\u628a\u5927\u5c0f\u9650\u5236\u5230\u6587\u4ef6\u5927\u5c0f\uff0c\u800c\u4e0d\u662f\u4ece\u5934\u5f00\u59cb\u8bfb\u3002\u4ee5\u4e0b\u662f\u539f\u6587\uff1a<\/p>\n<p>If the last-byte-pos value is absent, or if the value is greater than<br \/> or equal to the current length of the entity-body, last-byte-pos is<br \/> taken to be equal to one less than the current length of the entity-<br \/> body in bytes.<\/p>\n<p>\u53e6\u5916\u4e0a\u9762\u8fd8\u63d0\u5230\u4e00\u4e2a\u624b\u673a app \u5355\u4f4d\u6362\u7b97\u9519\u8bef\u7684\u95ee\u9898\uff0c\u4e5f\u9ebb\u70e6\u8f6c\u8fbe\u4e00\u4e0b\uff0c\u8c22\u8c22\uff01                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300144\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abo321 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wty \u8c22\u8c22\u60a8\u7684\u56de\u590d\u3002\u8bf7\u95ee\u4e0b\u60a8\u4f7f\u7528\u7684 app \u662f Android \u7248\u8fd8\u662f IOS \u7248\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300145\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abo321 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wty \u5173\u4e8e Range Get \u7684\u95ee\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u6211\u4eec\u7684\u5b98\u7f51\u6587\u7ae0\u300a\u5982\u4f55\u901a\u8fc7 HTTP Range \u8bf7\u6c42\u5206\u6bb5\u83b7\u53d6 OSS \u8d44\u6e90\u300b\uff1a https:\/\/help.aliyun.com\/knowledge_detail\/39571.html<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u8bf7\u6c42\u5934 x-oss-range-behavior:standard \u6765\u517c\u5bb9 RFC \u5b9a\u4e49\u7684\u884c\u4e3a\u3002<\/p>\n<p>=================<br \/>\u517c\u5bb9\u884c\u4e3a<br \/>\u4f7f\u7528 HTTP Range \u65f6\uff0c\u589e\u52a0\u8bf7\u6c42\u5934 x-oss-range-behavior:standard\uff0c\u53ef\u4ee5\u6539\u53d8\u6307\u5b9a\u8303\u56f4\u4e0d\u5728\u6709\u6548\u533a\u95f4\u65f6 OSS \u7684\u884c\u4e3a\u3002\u884c\u4e3a\u6539\u53d8\u7684\u793a\u4f8b\u5982\u4e0b\u3002<\/p>\n<p>\u6ce8\uff1a\u6b64\u5904\u5047\u8bbe Object \u8d44\u6e90\u5927\u5c0f\u4e3a 1000 \u5b57\u8282\uff0cRange \u6709\u6548\u533a\u95f4\u4e3a 0-999 \u3002<\/p>\n<p>Range: bytes=500-2000\uff1a\u672b\u5b57\u8282\u8d85\u51fa\u6709\u6548\u533a\u95f4\uff0c\u8fd4\u56de 500-999 \u5b57\u8282\u8303\u56f4\u5185\u5bb9\u3002<br \/>Range: bytes=1000-2000\uff1a\u9996\u5b57\u8282\u8d85\u51fa\u6709\u6548\u533a\u95f4\uff0c\u8fd4\u56de\u9519\u8bef 416 (InvalidRange)\u3002<br \/>Range: bytes=1000-\uff1a\u9996\u5b57\u8282\u8d85\u51fa\u6709\u6548\u533a\u95f4\uff0c\u8fd4\u56de\u9519\u8bef 416 (InvalidRange)\u3002<br \/>Range: bytes=-2000\uff1a\u6307\u5b9a\u8303\u56f4\u8d85\u51fa\u6709\u6548\u533a\u95f4\uff0c\u8fd4\u56de 0-999 \u5b57\u8282\uff0c\u5373\u5b8c\u6574\u7684\u6587\u4ef6\u5185\u5bb9\u3002<br \/>=================<\/p>\n<p>\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u90fd\u53ef\u4ee5\u5728\u963f\u91cc\u4e91\u5b58\u50a8\u5b98\u7f51\uff08 https:\/\/www.aliyun.com\/product\/oss \uff09\u9489\u9489\u626b\u63cf\u4e8c\u7ef4\u7801\u627e\u5230\u6211\u4eec\uff01<\/p>\n<p>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u53cd\u9988\uff01\u6211\u4eec\u4f1a\u59cb\u7ec8\u8ba4\u771f\u503e\u542c\u5404\u79cd\u53cd\u9988\uff0c\u5e76\u6301\u7eed\u4e0d\u65ad\u7684\u6539\u8fdb\u4ea7\u54c1\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u597d\u7684\u4e91\u5b58\u50a8\u670d\u52a1\uff01                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3300146\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @abo321 Android \u7248                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u963f\u91cc\u4e91 oss \u4e0b\u8f7d\u6587\u4ef6\uff0c\u6587\u4ef6\u5c45&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/155685"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=155685"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/155685\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155685"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}