You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2003/11/04 00:21:08 UTC

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

olegk       2003/11/03 15:21:08

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH HttpMethodBase.java
  Log:
  PR #24352 (NLTM Proxy and basic host authorization)
  
  Fixed the bug causing basic authentication via NLTM Proxy to fail
  
  Contributed by Oleg Kalnichevski
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.159.2.18 +8 -8      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.159.2.17
  retrieving revision 1.159.2.18
  diff -u -r1.159.2.17 -r1.159.2.18
  --- HttpMethodBase.java	3 Nov 2003 22:40:29 -0000	1.159.2.17
  +++ HttpMethodBase.java	3 Nov 2003 23:21:08 -0000	1.159.2.18
  @@ -1080,7 +1080,7 @@
   
                   // Discard status line
                   this.statusLine = null;
  -				this.connectionCloseForced = false;
  +                this.connectionCloseForced = false;
   
                   //write the request and read the response, will retry
                   processRequest(state, conn);
  @@ -2535,17 +2535,17 @@
                   realmsUsed.add(realm);
               }
   
  +            removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP);
  +            removeRequestHeader(HttpAuthenticator.PROXY_AUTH_RESP);
               try {
                   //remove preemptive header and reauthenticate
                   switch (statusCode) {
                       case HttpStatus.SC_UNAUTHORIZED:
  -                        removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP);
                           authenticated = HttpAuthenticator.authenticate(
                               authscheme, this, conn, state);
                           this.realm = authscheme.getRealm();
                           break;
                       case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
  -                        removeRequestHeader(HttpAuthenticator.PROXY_AUTH_RESP);
                           authenticated = HttpAuthenticator.authenticateProxy(
                               authscheme, this, conn, state);
                           this.proxyRealm = authscheme.getRealm();
  @@ -2754,7 +2754,7 @@
                   responseConnection.close();
               }
           }
  -		this.connectionCloseForced = false;
  +        this.connectionCloseForced = false;
           doneWithConnection = true;
           if (!inExecute) {
               ensureConnectionRelease();
  
  
  

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