commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods PostMethod.java
Date Mon, 21 Oct 2002 12:13:24 GMT
oglueck     2002/10/21 05:13:23

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
               httpclient/src/java/org/apache/commons/httpclient/methods
                        PostMethod.java
  Log:
  fixed NPE
  fixed forgotten querystring value
  
  Revision  Changes    Path
  1.67      +5 -5      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.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- HttpMethodBase.java	20 Oct 2002 13:34:55 -0000	1.66
  +++ HttpMethodBase.java	21 Oct 2002 12:13:23 -0000	1.67
  @@ -874,7 +874,7 @@
                       String absolutePath = URIUtil.getPath(url.toString());
                       String query = URIUtil.getQuery(url.toString());
                       setPath(URIUtil.decode(absolutePath));
  -                    setQueryString(URIUtil.decode(query));
  +                    setQueryString(query == null ? null : URIUtil.decode(query));
   
                       if (log.isDebugEnabled()) {
                           log.debug("Changing path from \"" + getPath()
  
  
  
  1.20      +14 -11    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java
  
  Index: PostMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- PostMethod.java	20 Oct 2002 13:36:43 -0000	1.19
  +++ PostMethod.java	21 Oct 2002 12:13:23 -0000	1.20
  @@ -422,17 +422,19 @@
        * 
        * <p>
        * Note: If you specify a content length the request is unbuffered. This
  -     * prevents automatic retry if a request fails the first time. This means
  -     * that the HttpClient can not perform authorization automatically but
  -     * will throw an Exception. You will have to set the necessary
  -     * 'Authorization' or 'Proxy-Authorization' headers manually.
  +     * prevents redirection and automatic retry if a request fails the first
  +     * time. This means that the HttpClient can not perform authorization
  +     * automatically but will throw an Exception. You will have to set the
  +     * necessary 'Authorization' or 'Proxy-Authorization' headers manually.
        * </p>
        * 
        * @param length size in bytes or any of CONTENT_LENGTH_AUTO,
  -     *        CONTENT_LENGTH_CHUNKED. If number of bytes is specified the
  -     *        content will not be buffered internally and the Content-Length
  -     *        header of the request will be used. In this case the user is
  -     *        responsible to supply the correct content length.
  +     *        CONTENT_LENGTH_CHUNKED. If number of bytes or CONTENT_LENGTH_CHUNKED
  +     *        is specified the content will not be buffered internally and the
  +     *        Content-Length header of the request will be used. In this case
  +     *        the user is responsible to supply the correct content length.
  +     *        If CONTENT_LENGTH_AUTO is specified the request will be buffered
  +     *        before it is sent over the network.
        * @throws RuntimeException if chunked transfer encoding is requested for
        *         a HTTP 1.0 request
        * 
  @@ -778,6 +780,7 @@
                   log.error("URI query value encoding error", urie);
                   queryValue = parameter.getValue();
               }
  +            buff.append(queryValue);
               if (it.hasNext()) {
                   buff.append("&");
               }
  
  
  

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