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 HttpMethodBase.java
Date Tue, 29 Oct 2002 07:51:40 GMT
jsdever     2002/10/28 23:51:40

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
  Log:
  Handle any query string in the constructor seperately from the path.
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6624
  
  Committed by: Jeff Dever
  
  Revision  Changes    Path
  1.75      +12 -6     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.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- HttpMethodBase.java	28 Oct 2002 14:20:30 -0000	1.74
  +++ HttpMethodBase.java	29 Oct 2002 07:51:40 -0000	1.75
  @@ -254,10 +254,16 @@
       /**
        * Path-specifying constructor.
        * 
  -     * @param path my path
  +     * @param path my path which can include a query
        */
       public HttpMethodBase(String path) {
  -        setPath(path);
  +        int pa = path.indexOf("?");
  +        if (pa < 0) { //its just a path
  +            setPath(path);
  +        } else { //its a path with a query
  +            setPath(path.substring(0, pa));
  +            setQueryString(path.substring(pa+1, path.length()));
  +        }
       }
   
       //~ Methods ииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
  
  
  

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