From c1783330fd225245b2bb2d2ce066a242178bcf55 Mon Sep 17 00:00:00 2001 From: Taras Glek Date: Mon, 13 Oct 2003 22:06:06 +0000 Subject: re PR libgcj/12592 (Http requests use \n instead of \r\n) 2003-10-13 Taras Judge PR libgcj/12592 * gnu/java/net/protocol/http/Connection.java (connect): Use \r\n, not just \n. From-SVN: r72443 --- libjava/gnu/java/net/protocol/http/Connection.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libjava/gnu/java/net/protocol') diff --git a/libjava/gnu/java/net/protocol/http/Connection.java b/libjava/gnu/java/net/protocol/http/Connection.java index 990287d..85c7910 100644 --- a/libjava/gnu/java/net/protocol/http/Connection.java +++ b/libjava/gnu/java/net/protocol/http/Connection.java @@ -138,13 +138,13 @@ class Connection extends HttpURLConnection PrintWriter out = new PrintWriter(sock.getOutputStream()); // Send request including any request properties that were set. - out.print(getRequestMethod() + " " + url.getFile() + " HTTP/1.0\n"); - out.print("Host: " + url.getHost() + ":" + port + "\n"); + out.print(getRequestMethod() + " " + url.getFile() + " HTTP/1.0\r\n"); + out.print("Host: " + url.getHost() + ":" + port + "\r\n"); Enumeration reqKeys = requestProperties.keys(); Enumeration reqVals = requestProperties.elements(); while (reqKeys.hasMoreElements()) - out.print(reqKeys.nextElement() + ": " + reqVals.nextElement() + "\n"); - out.print("\n"); + out.print(reqKeys.nextElement() + ": " + reqVals.nextElement() + "\r\n"); + out.print("\r\n"); out.flush(); getHttpHeaders(); connected = true; -- cgit v1.1