oglueck     2002/12/11 05:21:43

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
  Log:
  Fixed bug #15016
  
  Patch contributed by Michael Becke
  
  Revision  Changes    Path
  1.87      +9 -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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- HttpMethodBase.java       10 Dec 2002 04:05:03 -0000      1.86
  +++ HttpMethodBase.java       11 Dec 2002 13:21:43 -0000      1.87
  @@ -68,7 +68,6 @@
   import java.io.UnsupportedEncodingException;
   import java.net.MalformedURLException;
   import java.net.URL;
  -import java.util.Date;
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Iterator;
  @@ -966,9 +965,11 @@
               return false;
           }
   
  -        //update the current location with the redirect location
  -        setPath(redirectUrl.getPath());
  -        setQueryString(redirectUrl.getQuery());
  +        //update the current location with the redirect location.
  +        //avoiding use of URL.getPath() and URL.getQuery() to keep
  +        //jdk1.2 comliance.
  +        setPath( URIUtil.getPath( redirectUrl.toString() ) );
  +        setQueryString( URIUtil.getQuery( redirectUrl.toString() ) );
   
           if (log.isDebugEnabled()) {
               log.debug("Redirecting from '" + currentUrl.toExternalForm()
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to