commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morg...@apache.org
Subject cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/http ResponseImpl.java
Date Fri, 03 May 2002 19:36:11 GMT
morgand     02/05/03 12:36:11

  Modified:    latka/src/java/org/apache/commons/latka/http
                        ResponseImpl.java
  Log:
  getByteLength() was not returning -1 when the HTTP body is not
  present
  
  Revision  Changes    Path
  1.18      +6 -1      jakarta-commons/latka/src/java/org/apache/commons/latka/http/ResponseImpl.java
  
  Index: ResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/ResponseImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ResponseImpl.java	3 May 2002 16:04:50 -0000	1.17
  +++ ResponseImpl.java	3 May 2002 19:36:11 -0000	1.18
  @@ -70,7 +70,7 @@
    * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a>
    * @author <a href="mailto:mdelagra@us.britannica.com">Morgan Delagrange</a>
    * @author dIon Gillard
  - * @version $Id: ResponseImpl.java,v 1.17 2002/05/03 16:04:50 morgand Exp $
  + * @version $Id: ResponseImpl.java,v 1.18 2002/05/03 19:36:11 morgand Exp $
    */
   public class ResponseImpl implements Response {
   
  @@ -129,6 +129,11 @@
   
       // defined in interface
       public int getByteLength() {
  +        byte[] responseBytes = _httpMethod.getResponseBody();
  +        if (responseBytes == null) {
  +            return -1;
  +        }
  +
           return _httpMethod.getResponseBody().length;
       }
   
  
  
  

--
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