commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcs...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMethodBase.java
Date Tue, 16 Apr 2002 14:30:42 GMT
marcsaeg    02/04/16 07:30:42

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
  Log:
  No longer add Content-Length header for requests without a message body.
  Some servers have problems with requests that can't contain a message
  arriving with a Content-Length: 0 header.
  
  Submitted by:  xiaowei@stratify.com (Xiaowei Jiang)
  PR:  8083
  
  Revision  Changes    Path
  1.28      +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HttpMethodBase.java	12 Apr 2002 21:13:59 -0000	1.27
  +++ HttpMethodBase.java	16 Apr 2002 14:30:42 -0000	1.28
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
1.27 2002/04/12 21:13:59 marcsaeg Exp $
  - * $Revision: 1.27 $
  - * $Date: 2002/04/12 21:13:59 $
  + * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
1.28 2002/04/16 14:30:42 marcsaeg Exp $
  + * $Revision: 1.28 $
  + * $Date: 2002/04/16 14:30:42 $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -111,7 +111,7 @@
    * @author Rodney Waldhoff
    * @author Sean C. Sullivan
    * @author <a href="mailto:dion@apache.org">dIon Gillard</a>
  - * @version $Revision: 1.27 $ $Date: 2002/04/12 21:13:59 $
  + * @version $Revision: 1.28 $ $Date: 2002/04/16 14:30:42 $
    */
   public abstract class HttpMethodBase implements HttpMethod {
   
  @@ -832,7 +832,7 @@
           // add content length or chunking
           int len = getRequestContentLength();
           if (!requestHeaders.containsKey("content-length")) {
  -            if (-1 < len) {
  +            if (0 < len) {
                   setRequestHeader("Content-Length",String.valueOf(len));
               } else if (http11 && (len < 0)) {
                   setRequestHeader("Transfer-Encoding","chunked");
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message