morgand 01/05/14 14:31:46 Modified: httpclient/src/java/org/apache/commons/httpclient/methods PostMethod.java Log: post method required the content length to be set Revision Changes Path 1.3 +16 -5 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java Index: PostMethod.java =================================================================== RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PostMethod.java 2001/05/08 16:24:14 1.2 +++ PostMethod.java 2001/05/14 21:31:36 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v 1.2 2001/05/08 16:24:14 morgand Exp $ - * $Revision: 1.2 $ - * $Date: 2001/05/08 16:24:14 $ + * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v 1.3 2001/05/14 21:31:36 morgand Exp $ + * $Revision: 1.3 $ + * $Date: 2001/05/14 21:31:36 $ * * ==================================================================== * @@ -75,6 +75,7 @@ * POST Method. * * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a> + * @author <a href="mailto:[EMAIL PROTECTED]">Doug Sale</a> */ public class PostMethod extends GetMethod { @@ -211,6 +212,18 @@ /** + * from RFC1945:<BR> + * A valid Content-Length is required on all HTTP/1.0 POST requests. An + * HTTP/1.0 server should respond with a 400 (bad request) message if it + * cannot determine the length of the request message's content. + * + * @return true + */ + public boolean needContentLength() { + return true; + } + + /** * Parse response. * * @param is Input stream @@ -220,6 +233,4 @@ throws IOException { } */ - - }