diff options
| author | Michael Koch <konqueror@gmx.de> | 2004-10-26 11:51:45 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2004-10-26 11:51:45 +0000 |
| commit | fe7412b337ad8b7fdd59aa909c3ecebdc4a36b49 (patch) | |
| tree | 125a78593bfdb4b292bce66e0b742d17985b7dd4 /gnu/java/net/protocol/http/Connection.java | |
| parent | 40c8f1fe891769961f46f76e0b01094f14f9a22d (diff) | |
| download | classpath-fe7412b337ad8b7fdd59aa909c3ecebdc4a36b49.tar.gz | |
2004-10-26 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
(getOutputStream): Implicitely switch to POST method.
Diffstat (limited to 'gnu/java/net/protocol/http/Connection.java')
| -rw-r--r-- | gnu/java/net/protocol/http/Connection.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/java/net/protocol/http/Connection.java b/gnu/java/net/protocol/http/Connection.java index 2894e05cc..d968ca0aa 100644 --- a/gnu/java/net/protocol/http/Connection.java +++ b/gnu/java/net/protocol/http/Connection.java @@ -389,7 +389,8 @@ public final class Connection extends HttpURLConnection } /** - * Returns on OutputStream for writing to this connection. + * Returns on OutputStream for writing to this connection. This method + * implicitely changes request method to <code>POST</code>. * * @return An OutputStream for this connection. * @@ -408,6 +409,9 @@ public final class Connection extends HttpURLConnection if (bufferedOutputStream == null) bufferedOutputStream = new ByteArrayOutputStream (256); //default is too small + // Force POST request method. + setRequestMethod("POST"); + return bufferedOutputStream; } |
