From 8db8c940f180e23567dab2fb34a27e272d27fe4c Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 26 Oct 2004 11:48:42 +0000 Subject: 2004-10-26 Michael Koch * gnu/java/net/protocol/http/Connection.java (getOutputStream): Implicitely switch to POST method. From-SVN: r89581 --- libjava/gnu/java/net/protocol/http/Connection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libjava/gnu') diff --git a/libjava/gnu/java/net/protocol/http/Connection.java b/libjava/gnu/java/net/protocol/http/Connection.java index ec3e048..aac565c 100644 --- a/libjava/gnu/java/net/protocol/http/Connection.java +++ b/libjava/gnu/java/net/protocol/http/Connection.java @@ -391,7 +391,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 POST. * * @return An OutputStream for this connection. * @@ -410,6 +411,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; } -- cgit v1.1