aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-12-31 11:27:09 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-12-31 11:27:09 +0000
commit24ce9c2d97c9f5c0c13f9391d2bd0b094a616c82 (patch)
treebb7b78eb99701f2ac3f41f37cf4cf89e261268e4 /libjava
parenteb813adf1d3443148dabf8af4b359d8756ba500b (diff)
downloadgcc-24ce9c2d97c9f5c0c13f9391d2bd0b094a616c82.zip
gcc-24ce9c2d97c9f5c0c13f9391d2bd0b094a616c82.tar.gz
gcc-24ce9c2d97c9f5c0c13f9391d2bd0b094a616c82.tar.bz2
2003-12-31 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java (sendRequest): Dont encode output in default character encoding, add correct version number to HTTP user agent string. From-SVN: r75266
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/gnu/java/net/protocol/http/Connection.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index c60998e..bd1e8d2 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-31 Michael Koch <konqueror@gmx.de>
+
+ * gnu/java/net/protocol/http/Connection.java
+ (sendRequest): Dont encode output in default character encoding,
+ add correct version number to HTTP user agent string.
+
2003-12-31 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/ObjectOutputStream.java
diff --git a/libjava/gnu/java/net/protocol/http/Connection.java b/libjava/gnu/java/net/protocol/http/Connection.java
index 0bc50d1..b785f23 100644
--- a/libjava/gnu/java/net/protocol/http/Connection.java
+++ b/libjava/gnu/java/net/protocol/http/Connection.java
@@ -45,6 +45,7 @@ import java.io.DataInputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
+import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
@@ -200,7 +201,8 @@ public final class Connection extends HttpURLConnection
void sendRequest() throws IOException
{
// Create PrintWriter for easier sending of headers.
- PrintWriter outputWriter = new PrintWriter(outputStream);
+ PrintWriter outputWriter =
+ new PrintWriter(new OutputStreamWriter(outputStream, "8859_1"));
// Send request including any request properties that were set.
outputWriter.print (getRequestMethod() + " " + url.getFile()
@@ -215,7 +217,7 @@ public final class Connection extends HttpURLConnection
if (getRequestProperty ("user-agent") == null)
setRequestProperty ("user-agent", "gnu-libgcj/"
- + System.getProperty ("classpath.version"));
+ + System.getProperty ("java.vm.version"));
if (getRequestProperty ("accept") == null)
setRequestProperty ("accept", "*/*");