Browse Source

Fix http request without content-length (#7686)

Pavel Alexandrov 6 years ago
parent
commit
945461390b
1 changed files with 1 additions and 0 deletions
  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) {