{"id":42179,"date":"2024-12-01T12:26:08","date_gmt":"2024-12-01T04:26:08","guid":{"rendered":"https:\/\/fwq.ai\/blog\/42179\/"},"modified":"2024-12-01T12:26:08","modified_gmt":"2024-12-01T04:26:08","slug":"multipart-x-mixed-replace-png-%e6%b5%81%e5%a7%8b%e7%bb%88%e6%98%be%e7%a4%ba%e6%9c%80%e5%90%8e%e4%b8%80%e5%b8%a7%e4%b9%8b%e5%89%8d%e7%9a%84%e5%b8%a7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/42179\/","title":{"rendered":"multipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27"},"content":{"rendered":"<p><b><\/b> <\/p>\n<p>\u5f53\u524d\u4f4d\u7f6e\uff1a <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span> <span>multipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27<\/span><\/p>\n<h1>multipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27<\/h1>\n<p><span>\u6765\u6e90\uff1astackoverflow<\/span><br \/>\n<span>2024-04-22 21:45:37<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u4eca\u65e5\u4e0d\u80af\u57cb\u5934\uff0c\u660e\u65e5\u4f55\u4ee5\u62ac\u5934\uff01\u6bcf\u65e5\u4e00\u53e5\u52aa\u529b\u81ea\u5df1\u7684\u8bdd\u54c8\u54c8~\u54c8\u55bd\uff0c\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300amultipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27\u300b<\/span>\uff0c\u4e3b\u8981\u5185\u5bb9\u662f\u8bb2\u89e3<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u6536\u85cf\u6216\u8005\u6709\u66f4\u597d\u7684\u5efa\u8bae\u5728\u8bc4\u8bba\u63d0\u51fa\uff0c\u6211\u90fd\u4f1a\u8ba4\u771f\u770b\u7684\uff01\u5927\u5bb6\u4e00\u8d77\u8fdb\u6b65\uff0c\u4e00\u8d77\u5b66\u4e60\uff01<\/p>\n<p> \u95ee\u9898\u5185\u5bb9<br \/>\n <\/p>\n<p>\u5236\u4f5c\u4e86\u4e00\u4e2a\u901a\u8fc7 <code>multipart\/x-mixed-replace<\/code> <code>content-type<\/code> \u6807\u5934\u5c06 png \u56fe\u50cf\u6d41\u5f0f\u4f20\u8f93\u5230\u6d4f\u89c8\u5668\u7684\u7a0b\u5e8f\u540e\uff0c\u6211\u6ce8\u610f\u5230 <code>&lt;img&gt;<\/code> \u6807\u8bb0\u4e2d\u4ec5\u663e\u793a\u6700\u540e\u4e00\u5e27\uff0c\u800c\u4e0d\u662f\u6700\u8fd1\u53d1\u9001\u4e86\u4e00\u5c01\u3002<\/p>\n<p>\u8fd9\u79cd\u884c\u4e3a\u975e\u5e38\u70e6\u4eba\uff0c\u56e0\u4e3a\u6211\u53ea\u5728\u56fe\u50cf\u66f4\u6539\u65f6\u53d1\u9001\u66f4\u65b0\u4ee5\u8282\u7701\u5e26\u5bbd\uff0c\u8fd9\u610f\u5473\u7740\u5728\u6211\u7b49\u5f85\u66f4\u65b0\u65f6\u5c4f\u5e55\u4e0a\u4f1a\u663e\u793a\u9519\u8bef\u7684\u5e27\u3002<\/p>\n<p>\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4f7f\u7528\u7684\u662f brave \u6d4f\u89c8\u5668\uff08\u57fa\u4e8e chromium\uff09\uff0c\u4f46\u7531\u4e8e\u6211\u5c1d\u8bd5\u4e86\u4e0a\u4e0b\u201c\u5c4f\u853d\u201d\uff0c\u6211\u8ba4\u4e3a\u8fd9\u4e2a\u95ee\u9898\u81f3\u5c11\u4e5f\u51fa\u73b0\u5728\u5176\u4ed6\u57fa\u4e8e chromium \u7684\u6d4f\u89c8\u5668\u4e2d\u3002<\/p>\n<p>\u641c\u7d22\u95ee\u9898\u4ec5\u4ea7\u751f\u4e00\u4e2a\u76f8\u5173\u7ed3\u679c\uff08\u4ee5\u53ca\u8bb8\u591a\u4e0d\u76f8\u5173\u7684\u7ed3\u679c\uff09\uff0c\u5373 howtoforge \u7ebf\u7a0b\uff0c\u6ca1\u6709\u56de\u590d\u3002\u540c\u6837\uff0c\u6211\u4e5f\u8ba4\u4e3a\u95ee\u9898\u4e0e\u7f13\u51b2\u6709\u5173\uff0c\u4f46\u6211\u786e\u4fdd\u5237\u65b0\u7f13\u51b2\u533a\u65e0\u6d4e\u4e8e\u4e8b\uff0c\u8fd9\u4e0e\u7ebf\u7a0b\u4e2d\u7684\u7528\u6237\u975e\u5e38\u76f8\u4f3c\u3002\u7528\u6237\u786e\u5b9e\u62a5\u544a\u8bf4\u5b83\u53ef\u4ee5\u5728\u4ed6\u4eec\u7684\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u4f46\u4e0d\u80fd\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u8fd9\u8ba9\u6211\u76f8\u4fe1\u5b83\u53ef\u80fd\u4e0e\u7279\u5b9a\u7684 http \u6807\u5934\u6216\u7c7b\u4f3c\u7684\u4e1c\u897f\u6709\u5173\u3002\u6211\u7684\u7b2c\u4e00\u4e2a\u731c\u6d4b\u662f <code>content-length<\/code> \u56e0\u4e3a\u6d4f\u89c8\u5668\u53ef\u4ee5\u4ece\u4e2d\u5224\u65ad\u56fe\u50cf\u4f55\u65f6\u5b8c\u6574\uff0c\u4f46\u5b83\u4f3c\u4e4e\u6ca1\u6709\u4efb\u4f55\u6548\u679c\u3002<\/p>\n<p>\u672c\u8d28\u4e0a\uff0c\u6211\u7684\u95ee\u9898\u662f\uff1a<strong>\u6709\u6ca1\u6709\u529e\u6cd5\u544a\u8bc9\u6d4f\u89c8\u5668\u663e\u793a\u6700\u65b0\u7684 <code>multipart\/x-mixed-replace<\/code><\/strong> \u800c\u4e0d\u662f\u4e4b\u524d\u7684\uff1f\u800c\u4e14\uff0c\u5982\u679c\u8fd9\u4e0d\u662f\u6807\u51c6\u884c\u4e3a\uff0c\u539f\u56e0\u53ef\u80fd\u662f\u4ec0\u4e48\uff1f<\/p>\n<p>\u5f53\u7136\uff0c\u8fd9\u662f\u76f8\u5173\u7684\u6e90\u4ee3\u7801\uff0c\u5c3d\u7ba1\u6211\u8ba4\u4e3a\u8fd9\u66f4\u50cf\u662f\u4e00\u4e2a\u4e00\u822c\u7684 http \u95ee\u9898\uff0c\u800c\u4e0d\u662f\u4e0e\u4ee3\u7801\u6709\u5173\u7684\u95ee\u9898\uff1a<\/p>\n<h1>\u670d\u52a1\u5668<\/h1>\n<pre>package routes\n\nimport (\n    \"crypto\/md5\"\n    \"fmt\"\n    \"image\/color\"\n    \"net\/http\"\n    \"time\"\n\n    brain \"path\/to\/image\/generator\/module\"\n)\n\nfunc init() {\n    routehandler{\n        function: func(w http.responsewriter, r *http.request) {\n            w.header().set(\"content-type\", \"multipart\/x-mixed-replace; boundary=frame\")\n            w.header().set(\"cache-control\", \"no-cache\") \/\/ &lt;- just in case\n            w.writeheader(200)\n\n            \/\/ if the request contains a token and the token maps to a valid \"brain\", start consuming frames from\n            \/\/ the brain and returning them to the client\n            params := r.url.query()\n            if val, ok := params[\"token\"]; ok &amp;&amp; len(val) &gt; 0 {\n                if b, ok := sharedmemory[\"brains\"].(map[string]*brain.brain)[val[0]]; ok &amp;&amp; !b.checkhasexit() {\n                    \/\/ keep a checksum of the previous frame to avoid sending frames which haven't changed. frames cannot\n                    \/\/ be compared directly (at least efficiently) as they are slices not arrays\n                    previousframechecksum := [16]byte{}\n\n                    for {\n                        if !b.checkhasexit() {\n                            frame, err := b.getnextframe(sharedmemory[\"conf\"].(map[string]interface{})[\"display_col\"].(color.color))\n                            if err == nil &amp;&amp; md5.sum(frame) != previousframechecksum {\n                                \/\/ only write the frame if we succesfully read it and it's different to the previous\n                                _, err = w.write([]byte(fmt.sprintf(\"--frame\\r\\ncontent-type: image\/png\\r\\ncontent-size: %d\\r\\n\\r\\n%s\\r\\n\", len(frame), frame)))\n                                if err != nil {\n                                    \/\/ the client most likely disconnected, so we should end the stream. as the brain still exists, the\n                                    \/\/ user can re-connect at any time\n                                    return\n                                }\n                                \/\/ update the checksum to this frame\n                                previousframechecksum = md5.sum(frame)\n                                \/\/ if possible, flush the buffer to make sure the frame is sent asap\n                                if flusher, ok := w.(http.flusher); ok {\n                                    flusher.flush()\n                                }\n                            }\n                            \/\/ limit the framerate to reduce cpu usage\n                            &lt;-time.after(time.duration(sharedmemory[\"conf\"].(map[string]interface{})[\"fps_limiter_interval\"].(int)) * time.millisecond)\n                        } else {\n                            \/\/ the brain has exit so there is no more we can do - we are braindead :p\n                            return\n                        }\n                    }\n                }\n            }\n        },\n    }.register(\"\/stream\", \"\/stream.png\")\n}<\/pre>\n<h1>\u5ba2\u6237\u7aef\uff08<code>start()<\/code>\u5728\u4e3b\u4f53<code>onload<\/code>\u4e2d\u8fd0\u884c\uff09<\/h1>\n<pre>function start() {\n    \/\/ Fetch the token from local storage. If it's empty, the server will automatically create a new one\n    var token = localStorage.getItem(\"token\");\n    \/\/ Create a session with the server\n    http = new XMLHttpRequest();\n    http.open(\"GET\", \"\/startsession?token=\"+(token)+\"&amp;w=\"+(parent.innerWidth)+\"&amp;h=\"+(parent.innerHeight));\n    http.send();\n    http.onreadystatechange = (e) =&gt; {\n        if (http.readyState === 4 &amp;&amp; http.status === 200) {\n            \/\/ Save the returned token\n            token = http.responseText;\n            localStorage.setItem(\"token\", token);\n            \/\/ Create screen\n            var img = document.createElement(\"img\");\n            img.alt = \"main display\";\n            \/\/ Hide the loader when it loads\n            img.onload = function() {\n                var loader = document.getElementById(\"loader\");\n                loader.remove();\n            }\n            \/\/ Start loading\n            img.src = \"\/stream.png?token=\"+token;\n            \/\/ Start capturing keystrokes\n            document.onkeydown = function(e) {\n                \/\/ Send the keypress to the server as a command (ignore the response)\n                cmdsend = new XMLHttpRequest();\n                cmdsend.open(\"POST\", \"\/cmd?token=\"+(token));\n                cmdsend.send(\"keypress:\"+e.code);\n                \/\/ Catch special cases\n                if (e.code === \"Escape\") {\n                    \/\/ Clear local storage to remove leftover token\n                    localStorage.clear();\n                    \/\/ Remove keypress handler\n                    document.onkeydown = function(e) {}\n                    \/\/ Notify the user\n                    alert(\"Session ended succesfully and the screen is inactive. You may now close this tab.\");\n                }\n                \/\/ Cancel whatever it is the keypress normally does\n                return false;\n            }\n            \/\/ Add screen to body\n            document.getElementById(\"body\").appendChild(img);\n        } else if (http.readyState === 4) {\n            alert(\"Error while starting the session: \"+http.responseText);\n        }\n    }\n}<\/pre>\n<p> <\/p>\n<h2>\u89e3\u51b3\u65b9\u6848<\/h2>\n<p> <\/p>\n<p>\u591a\u90e8\u5206 MIME \u6d88\u606f\u5185\u7684\u90e8\u5206\u4ee5 MIME \u6807\u5934\u5f00\u59cb\uff0c\u4ee5\u8fb9\u754c<strong>\u7ed3\u675f<\/strong>\u3002\u7b2c\u4e00\u4e2a\u5b9e\u90e8\u4e4b\u524d\u6709\u4e00\u4e2a\u8fb9\u754c\u3002\u8be5\u521d\u59cb\u8fb9\u754c\u5c01\u95ed\u4e86 MIME \u524d\u5bfc\u7801\u3002<\/p>\n<p>\u60a8\u7684\u4ee3\u7801\u5047\u8bbe\u96f6\u4ef6<strong>\u4ece\u8fb9\u754c\u5f00\u59cb<\/strong>\u3002\u57fa\u4e8e\u6b64\u5047\u8bbe\uff0c\u60a8\u9996\u5148\u53d1\u9001\u8fb9\u754c\uff0c\u7136\u540e\u53d1\u9001 MIME \u6807\u5934\uff0c\u6700\u540e\u53d1\u9001 MIME \u6b63\u6587\u3002\u7136\u540e\u505c\u6b62\u53d1\u9001\uff0c\u76f4\u5230\u4e0b\u4e00\u90e8\u5206\u51c6\u5907\u597d\u3002\u56e0\u6b64\uff0c\u53ea\u6709\u5728\u53d1\u9001\u4e0b\u4e00\u90e8\u5206\u540e\uff0c\u624d\u4f1a\u68c0\u6d4b\u5230\u4e00\u4e2a\u90e8\u5206\u7684\u7ed3\u5c3e\uff0c\u56e0\u4e3a\u53ea\u6709\u90a3\u65f6\u60a8\u624d\u53d1\u9001\u524d\u4e00\u90e8\u5206\u7684\u7ed3\u675f\u8fb9\u754c\u3002<\/p>\n<p>\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u60a8\u7684\u4ee3\u7801\u5e94\u9996\u5148\u53d1\u9001\u4e00\u4e2a\u8fb9\u754c\u6765\u7ed3\u675f MIME \u524d\u5bfc\u7801\u3002\u5bf9\u4e8e\u6bcf\u4e2a\u65b0\u90e8\u5206\uff0c\u5b83\u5e94\u8be5\u53d1\u9001 MIME \u6807\u5934\u3001MIME \u6b63\u6587\uff0c\u7136\u540e\u53d1\u9001\u7ed3\u675f\u8be5\u90e8\u5206\u7684\u8fb9\u754c\u3002<\/p>\n<p>\u6211\u9047\u5230\u4e86\u540c\u6837\u7684\u95ee\u9898\uff1a\u4f7f\u7528 <code>multipart\/x-mixed \u65f6\u6709 1 \u5e27\u5ef6\u8fdf-\u66ff\u6362<\/code><\/p>\n<p>\u6b64\u95ee\u9898\u4f3c\u4e4e\u51fa\u73b0\u5728 Chrome \u4e2d\uff0c\u5e76\u4e14\u4f3c\u4e4e\u4e0e  <code>multipart\/x-mixed-replace<\/code> \u8d44\u6e90\u6709\u5173\u3002 Firefox \u4e2d\u4e0d\u5b58\u5728\u6b64\u95ee\u9898\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u201c\u6b3a\u9a97\u201dChrome \u663e\u793a\u89c6\u9891\u6d41\u7684\u552f\u4e00\u65b9\u6cd5\u662f\u5c06\u6bcf\u4e2a\u56fe\u50cf\u53d1\u9001\u4e24\u6b21\uff0c\u6216\u8005\u63a5\u53d7 1 \u5e27\u5ef6\u8fdf\u3002 \u5982\u524d\u6240\u8ff0\uff0cFirefox \u4e2d\u4e0d\u5b58\u5728\u8be5\u95ee\u9898\u3002<\/p>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300amultipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u524d\u4f4d\u7f6e\uff1a &gt; &gt; &gt; &gt; multipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27 multipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27 \u6765\u6e90\uff1astackoverflow 2024-04-22 21:45:37 0\u6d4f\u89c8 \u6536\u85cf \u4eca\u65e5\u4e0d\u80af\u57cb\u5934\uff0c\u660e\u65e5\u4f55\u4ee5\u62ac\u5934\uff01\u6bcf\u65e5\u4e00\u53e5\u52aa\u529b\u81ea\u5df1\u7684\u8bdd\u54c8\u54c8~\u54c8\u55bd\uff0c\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7\u300amultipart\/x-mixed-replace PNG \u6d41\u59cb\u7ec8\u663e\u793a\u6700\u540e\u4e00\u5e27\u4e4b\u524d\u7684\u5e27\u300b\uff0c\u4e3b\u8981\u5185\u5bb9\u662f\u8bb2\u89e3\u7b49\u7b49\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u6536\u85cf\u6216\u8005\u6709\u66f4\u597d\u7684\u5efa\u8bae\u5728\u8bc4\u8bba\u63d0\u51fa\uff0c\u6211\u90fd\u4f1a\u8ba4\u771f\u770b\u7684\uff01\u5927\u5bb6\u4e00\u8d77\u8fdb\u6b65\uff0c\u4e00\u8d77\u5b66\u4e60\uff01 \u95ee\u9898\u5185\u5bb9 \u5236\u4f5c\u4e86\u4e00\u4e2a\u901a\u8fc7 multipart\/x-mixed-replace content-type \u6807\u5934\u5c06 png \u56fe\u50cf\u6d41\u5f0f\u4f20\u8f93\u5230\u6d4f\u89c8\u5668\u7684\u7a0b\u5e8f\u540e\uff0c\u6211\u6ce8\u610f\u5230 &lt;img&gt; \u6807\u8bb0\u4e2d\u4ec5\u663e\u793a\u6700\u540e\u4e00\u5e27\uff0c\u800c\u4e0d\u662f\u6700\u8fd1\u53d1\u9001\u4e86\u4e00\u5c01\u3002 \u8fd9\u79cd\u884c\u4e3a\u975e\u5e38\u70e6\u4eba\uff0c\u56e0\u4e3a\u6211\u53ea\u5728\u56fe\u50cf\u66f4\u6539\u65f6\u53d1\u9001\u66f4\u65b0\u4ee5\u8282\u7701\u5e26\u5bbd\uff0c\u8fd9\u610f\u5473\u7740\u5728\u6211\u7b49\u5f85\u66f4\u65b0\u65f6\u5c4f\u5e55\u4e0a\u4f1a\u663e\u793a\u9519\u8bef\u7684\u5e27\u3002 \u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4f7f\u7528\u7684\u662f brave \u6d4f\u89c8\u5668\uff08\u57fa\u4e8e chromium\uff09\uff0c\u4f46\u7531\u4e8e\u6211\u5c1d\u8bd5\u4e86\u4e0a\u4e0b\u201c\u5c4f\u853d\u201d\uff0c\u6211\u8ba4\u4e3a\u8fd9\u4e2a\u95ee\u9898\u81f3\u5c11\u4e5f\u51fa\u73b0\u5728\u5176\u4ed6\u57fa\u4e8e chromium \u7684\u6d4f\u89c8\u5668\u4e2d\u3002 \u641c\u7d22\u95ee\u9898\u4ec5\u4ea7\u751f\u4e00\u4e2a\u76f8\u5173\u7ed3\u679c\uff08\u4ee5\u53ca\u8bb8\u591a\u4e0d\u76f8\u5173\u7684\u7ed3\u679c\uff09\uff0c\u5373 howtoforge \u7ebf\u7a0b\uff0c\u6ca1\u6709\u56de\u590d\u3002\u540c\u6837\uff0c\u6211\u4e5f\u8ba4\u4e3a\u95ee\u9898\u4e0e\u7f13\u51b2\u6709\u5173\uff0c\u4f46\u6211\u786e\u4fdd\u5237\u65b0\u7f13\u51b2\u533a\u65e0\u6d4e\u4e8e\u4e8b\uff0c\u8fd9\u4e0e\u7ebf\u7a0b\u4e2d\u7684\u7528\u6237\u975e\u5e38\u76f8\u4f3c\u3002\u7528\u6237\u786e\u5b9e\u62a5\u544a\u8bf4\u5b83\u53ef\u4ee5\u5728\u4ed6\u4eec\u7684\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u4f46\u4e0d\u80fd\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u8fd9\u8ba9\u6211\u76f8\u4fe1\u5b83\u53ef\u80fd\u4e0e\u7279\u5b9a\u7684 http \u6807\u5934\u6216\u7c7b\u4f3c\u7684\u4e1c\u897f\u6709\u5173\u3002\u6211\u7684\u7b2c\u4e00\u4e2a\u731c\u6d4b\u662f content-length \u56e0\u4e3a\u6d4f\u89c8\u5668\u53ef\u4ee5\u4ece\u4e2d\u5224\u65ad\u56fe\u50cf\u4f55\u65f6\u5b8c\u6574\uff0c\u4f46\u5b83\u4f3c\u4e4e\u6ca1\u6709\u4efb\u4f55\u6548\u679c\u3002 \u672c\u8d28\u4e0a\uff0c\u6211\u7684\u95ee\u9898\u662f\uff1a\u6709\u6ca1\u6709\u529e\u6cd5\u544a\u8bc9\u6d4f\u89c8\u5668\u663e\u793a\u6700\u65b0\u7684 multipart\/x-mixed-replace \u800c\u4e0d\u662f\u4e4b\u524d\u7684\uff1f\u800c\u4e14\uff0c\u5982\u679c\u8fd9\u4e0d\u662f\u6807\u51c6\u884c\u4e3a\uff0c\u539f\u56e0\u53ef\u80fd\u662f\u4ec0\u4e48\uff1f \u5f53\u7136\uff0c\u8fd9\u662f\u76f8\u5173\u7684\u6e90\u4ee3\u7801\uff0c\u5c3d\u7ba1\u6211\u8ba4\u4e3a\u8fd9\u66f4\u50cf\u662f\u4e00\u4e2a\u4e00\u822c\u7684 http \u95ee\u9898\uff0c\u800c\u4e0d\u662f\u4e0e\u4ee3\u7801\u6709\u5173\u7684\u95ee\u9898\uff1a \u670d\u52a1\u5668 package routes import ( &#8220;crypto\/md5&#8221; &#8220;fmt&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-42179","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/42179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=42179"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/42179\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=42179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=42179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=42179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}