You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/09/12 13:36:46 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient ChunkedInputStream.java HttpMethodBase.java

jsdever     2002/09/12 04:36:46

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        ChunkedInputStream.java HttpMethodBase.java
  Log:
  Minor fix to logging and parsing chunked stream.
  
  Fix for bugs:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12556
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12555
  
  Contributed by: Ryan Hoegg
  
  Revision  Changes    Path
  1.3       +7 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedInputStream.java
  
  Index: ChunkedInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedInputStream.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChunkedInputStream.java	2 Sep 2002 22:04:13 -0000	1.2
  +++ ChunkedInputStream.java	12 Sep 2002 11:36:45 -0000	1.3
  @@ -193,7 +193,9 @@
           //parse data
           String dataString = new String(baos.toByteArray(), HTTP_ENC);
           int separator = dataString.indexOf(';');
  -        if (separator > 0) dataString = dataString.substring(0, separator).trim();
  +        dataString = (separator > 0) 
  +            ? dataString.substring(0, separator).trim() 
  +            : dataString.trim();
   
           int result;
           try {
  @@ -244,4 +246,4 @@
       public void close() throws IOException {
           in.close();
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.60      +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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- HttpMethodBase.java	7 Sep 2002 01:07:47 -0000	1.59
  +++ HttpMethodBase.java	12 Sep 2002 11:36:45 -0000	1.60
  @@ -1028,7 +1028,7 @@
       protected void addContentLengthRequestHeader(HttpState state, 
                                                    HttpConnection conn)
       throws IOException, HttpException {
  -        log.trace("enter HttpMethodBase.addProxyAuthorizationRequestHeader("
  +        log.trace("enter HttpMethodBase.addContentLengthRequestHeader("
                     + "HttpState, HttpConnection)");
   
           // add content length or chunking
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>