mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
eb813adf1d
commit
24ce9c2d97
|
@ -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>
|
2003-12-31 Guilhem Lavaux <guilhem@kaffe.org>
|
||||||
|
|
||||||
* java/io/ObjectOutputStream.java
|
* java/io/ObjectOutputStream.java
|
||||||
|
|
|
@ -45,6 +45,7 @@ import java.io.DataInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.ProtocolException;
|
import java.net.ProtocolException;
|
||||||
|
@ -200,7 +201,8 @@ public final class Connection extends HttpURLConnection
|
||||||
void sendRequest() throws IOException
|
void sendRequest() throws IOException
|
||||||
{
|
{
|
||||||
// Create PrintWriter for easier sending of headers.
|
// 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.
|
// Send request including any request properties that were set.
|
||||||
outputWriter.print (getRequestMethod() + " " + url.getFile()
|
outputWriter.print (getRequestMethod() + " " + url.getFile()
|
||||||
|
@ -215,7 +217,7 @@ public final class Connection extends HttpURLConnection
|
||||||
|
|
||||||
if (getRequestProperty ("user-agent") == null)
|
if (getRequestProperty ("user-agent") == null)
|
||||||
setRequestProperty ("user-agent", "gnu-libgcj/"
|
setRequestProperty ("user-agent", "gnu-libgcj/"
|
||||||
+ System.getProperty ("classpath.version"));
|
+ System.getProperty ("java.vm.version"));
|
||||||
|
|
||||||
if (getRequestProperty ("accept") == null)
|
if (getRequestProperty ("accept") == null)
|
||||||
setRequestProperty ("accept", "*/*");
|
setRequestProperty ("accept", "*/*");
|
||||||
|
|
Loading…
Reference in New Issue