This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: fix libjava http be more compliant


Hello,
This is a patch to fix bug libgcj/12592


Taras
Index: Connection.java
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/gnu/gcj/protocol/http/Attic/Connection.java,v
retrieving revision 1.8
diff -u -r1.8 Connection.java
--- Connection.java	3 Jan 2003 18:05:00 -0000	1.8
+++ Connection.java	13 Oct 2003 03:01:46 -0000
@@ -130,13 +130,13 @@
     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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]