Commit c1783330 by Taras Glek Committed by Tom Tromey

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
parent d29b8ad8
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.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment