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 Wed, 04 Sep 2002 00:58:27 GMT
jsdever     2002/09/03 17:58:27

  Modified:    httpclient/src/java/org/apache/commons/httpclient/util
                        HttpURLConnection.java
  Log:
  Fix mangling of prefious HttpUrlConnection patch.
  
  Revision  Changes    Path
  1.5       +10 -14    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HttpURLConnection.java	2 Sep 2002 15:37:29 -0000	1.4
  +++ HttpURLConnection.java	4 Sep 2002 00:58:26 -0000	1.5
  @@ -114,10 +114,6 @@
        */
       private URL url;
   
  -    private int theKeyPosition;
  -
  -    private int thePosition;
  -
   
   
       // ----------------------------------------------------------- Constructors
  @@ -250,7 +246,7 @@
           // a response header. However, getHeaderFieldKey(0) is supposed to 
           // return null. Hence the special case below ...
           
  -        if (theKeyPosition == 0) {
  +        if (keyPosition == 0) {
               return null;
           }
   
  @@ -258,11 +254,11 @@
           // calling getRequestHeaders.
   
           Header[] headers = this.method.getResponseHeaders();
  -        if (theKeyPosition < 0 || theKeyPosition >= headers.length) {
  +        if (keyPosition < 0 || keyPosition >= headers.length) {
               return null;
           }
   
  -        return headers[theKeyPosition - 1].getName();
  +        return headers[keyPosition - 1].getName();
       }
   
       /**
  @@ -276,7 +272,7 @@
           // a response header. However, getHeaderField(0) is supposed to 
           // return the status line. Hence the special case below ...
           
  -        if (thePosition == 0) {
  +        if (position == 0) {
               if (((HttpMethodBase) this.method).isHttp11()) {
                   return "HTTP/1.1 " + this.method.getStatusCode() 
                       + " " + this.method.getStatusText();
  @@ -290,11 +286,11 @@
           // calling getRequestHeaders.
   
           Header[] headers = this.method.getResponseHeaders();
  -        if (thePosition < 0 || thePosition >= headers.length) {
  +        if (position < 0 || position >= headers.length) {
               return null;
           }
   
  -        return headers[thePosition - 1].getValue();
  +        return headers[position - 1].getValue();
       }
   
       /**
  
  
  

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