re PR libgcj/12592 (Http requests use \n instead of \r\n)

2003-10-13  Taras Judge  <taras.judge@shaw.ca>

	PR libgcj/12592
	* gnu/java/net/protocol/http/Connection.java (connect): Use \r\n,
	not just \n.

From-SVN: r72443
This commit is contained in:
Taras Glek 2003-10-13 22:06:06 +00:00 committed by Tom Tromey
parent d29b8ad8d8
commit c1783330fd
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2003-10-13 Taras Judge <taras.judge@shaw.ca>
PR libgcj/12592
* gnu/java/net/protocol/http/Connection.java (connect): Use \r\n,
not just \n.
2003-10-13 Michael Koch <konqueror@gmx.de>
* java/io/File.java: Reformated.

View File

@ -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;