out = sock.getOutputStream();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(out));
pw.print("POST " + path + " HTTP/1.0\r\n");
- pw.print("Host: " + host + "\r\n");
pw.print("User-Agent: XWT\r\n");
pw.print("Content-length: " + contentLength + "\r\n");
pw.print(headers);
} else {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(sock.getOutputStream()));
pw.print("GET " + path + " HTTP/1.0\r\n");
- pw.print("Host: " + host + "\r\n");
+ System.out.println("GET " + path + " HTTP/1.0\r\n");
pw.print("User-Agent: XWT\r\n");
pw.print(headers);
pw.print("\r\n");