Sfoglia il codice sorgente

fixed setPostData on CPP/PHP/Neko

Nicolas Cannasse 13 anni fa
parent
commit
45807ef9cb
1 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 3 5
      std/haxe/Http.hx

+ 3 - 5
std/haxe/Http.hx

@@ -390,13 +390,11 @@ class Http {
 			b.add(headers.get(h));
 			b.add(headers.get(h));
 			b.add("\r\n");
 			b.add("\r\n");
 		}
 		}
+		b.add("\r\n");
 		if( postData != null)
 		if( postData != null)
 			b.add(postData);
 			b.add(postData);
-		else {
-			b.add("\r\n");
-			if( post && uri != null )
-				b.add(uri);
-		}
+		else if( post && uri != null )
+			b.add(uri);
 		try {
 		try {
 			if( Http.PROXY != null )
 			if( Http.PROXY != null )
 				sock.connect(new Host(Http.PROXY.host),Http.PROXY.port);
 				sock.connect(new Host(Http.PROXY.host),Http.PROXY.port);