commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsde...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util HttpURLConnection.java
Date Thu, 05 Sep 2002 00:42:51 GMT
jsdever     2002/09/04 17:42:51

  Modified:    httpclient/src/java/org/apache/commons/httpclient/util
                        HttpURLConnection.java
  Log:
  Fix a off by one error.
  
  Revision  Changes    Path
  1.7       +13 -10    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/HttpURLConnection.java
  
  Index: HttpURLConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/HttpURLConnection.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HttpURLConnection.java	5 Sep 2002 00:21:57 -0000	1.6
  +++ HttpURLConnection.java	5 Sep 2002 00:42:51 -0000	1.7
  @@ -89,6 +89,9 @@
    * including the numerous <code>HttpURLConnection</code> bugs!).
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
  + * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
  + *
  + * @since 2.0
    *
    * @version $Id$
    */
  @@ -249,11 +252,11 @@
               return null;
           }
   
  -        // Note: I hope the header fields are kept in the correct order when
  -        // calling getRequestHeaders.
  +        // Note: HttpClient does not currently keep headers in the same order
  +        // that they are read from the HTTP server.
   
           Header[] headers = this.method.getResponseHeaders();
  -        if (keyPosition < 0 || keyPosition >= headers.length) {
  +        if (keyPosition < 0 || keyPosition > headers.length) {
               return null;
           }
   
  @@ -275,11 +278,11 @@
               return this.method.getStatusLine();
           }
   
  -        // Note: I hope the header fields are kept in the correct order when
  -        // calling getRequestHeaders.
  +        // Note: HttpClient does not currently keep headers in the same order
  +        // that they are read from the HTTP server.
   
           Header[] headers = this.method.getResponseHeaders();
  -        if (position < 0 || position >= headers.length) {
  +        if (position < 0 || position > headers.length) {
               return null;
           }
   
  
  
  

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