2
0
Эх сурвалжийг харах

Check null-ness of body before length in sys.Http

hughsando 6 жил өмнө
parent
commit
76985c4903
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      std/sys/Http.hx

+ 1 - 1
std/sys/Http.hx

@@ -252,7 +252,7 @@ class Http extends haxe.http.HttpBase {
 	}
 
 	function writeBody(body:String, fileInput:haxe.io.Input, fileSize:Int, boundary:String, sock:sys.net.Socket) {
-		if (body.length>0 && body!=null)
+		if (body!=null && body.length>0)
 			sock.write(body);
 		if (boundary!=null) {
 			var bufsize = 4096;