浏览代码

Fix http request without content-length (#7686)

Pavel Alexandrov 6 年之前
父节点
当前提交
945461390b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      std/sys/Http.hx

+ 1 - 0
std/sys/Http.hx

@@ -365,6 +365,7 @@ class Http extends haxe.http.HttpBase {
 			try {
 				while(true) {
 					var len = sock.input.readBytes(buf,0,bufsize);
+					if (len == 0) break;
 					api.writeBytes(buf,0,len);
 				}
 			} catch(e:haxe.io.Eof) {