commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods DeleteMethod.java EntityEnclosingMethod.java ExpectContinueMethod.java GetMethod.java HeadMethod.java MultipartPostMethod.java OptionsMethod.java PostMethod.java PutMethod.java TraceMethod.java
Date Sat, 09 Aug 2003 19:37:59 GMT
olegk       2003/08/09 12:37:59

  Modified:    httpclient/src/java/org/apache/commons/httpclient/methods
                        DeleteMethod.java EntityEnclosingMethod.java
                        ExpectContinueMethod.java GetMethod.java
                        HeadMethod.java MultipartPostMethod.java
                        OptionsMethod.java PostMethod.java PutMethod.java
                        TraceMethod.java
  Log:
  Another round of Javadoc clean-ups
  
  Contributed by Oleg Kalnichevski
  
  Revision  Changes    Path
  1.12      +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/DeleteMethod.java
  
  Index: DeleteMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/DeleteMethod.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DeleteMethod.java	2 Feb 2003 04:30:13 -0000	1.11
  +++ DeleteMethod.java	9 Aug 2003 19:37:58 -0000	1.12
  @@ -67,7 +67,7 @@
   
   
   /**
  - * Implements the HTTP DELETE specification.
  + * Implements the HTTP DELETE method.
    * <p>
    * The HTTP DELETE method is defined in section 9.7 of 
    * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
  
  
  
  1.26      +39 -30    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java
  
  Index: EntityEnclosingMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- EntityEnclosingMethod.java	30 Jul 2003 21:11:17 -0000	1.25
  +++ EntityEnclosingMethod.java	9 Aug 2003 19:37:58 -0000	1.26
  @@ -158,7 +158,7 @@
       /**
        * Returns <tt>true</tt> if there is a request body to be sent.
        * 
  -     * <P>This method must be overwritten by sub-classes that implement
  +     * <P>This method must be overridden by sub-classes that implement
        * alternative request content input methods
        * </p>
        * 
  @@ -174,9 +174,9 @@
       }
   
       /**
  -     * Clears request body.
  +     * Clears the request body.
        * 
  -     * <p>This method must be overwritten by sub-classes that implement
  +     * <p>This method must be overridden by sub-classes that implement
        * alternative request content input methods.</p>
        * 
        * @since 2.0beta1
  @@ -190,9 +190,9 @@
       }
   
       /**
  -     * Generates request body.   
  +     * Generates the request body.   
        * 
  -     * <p>This method must be overwritten by sub-classes that implement
  +     * <p>This method must be overridden by sub-classes that implement
        * alternative request content input methods.</p>
        * 
        * @return request body as an array of bytes. If the request content 
  @@ -294,7 +294,7 @@
       }
   
       /**
  -     * Return the length of the request body.
  +     * Returns the length of the request body.
        *
        * @return number of bytes in the request body
        */
  @@ -329,11 +329,14 @@
        * <tt>super</tt>) to add the "standard" headers.
        * </p>
        *
  -     * @param state the client state
  -     * @param conn the {@link HttpConnection} the headers will eventually be
  -     *        written to
  -     * @throws IOException when an error occurs writing the request
  -     * @throws HttpException when a HTTP protocol error occurs
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        *
        * @see #writeRequestHeaders
        */
  @@ -346,7 +349,7 @@
           addContentLengthRequestHeader(state, conn);
       }
       /**
  -     * Adds a <tt>Content-Length</tt> or <tt>Transfer-Encoding: Chunked</tt>
  +     * Generates <tt>Content-Length</tt> or <tt>Transfer-Encoding: Chunked</tt>
        * request header, as long as no <tt>Content-Length</tt> request header
        * already exists.
        *
  @@ -387,10 +390,10 @@
       }
   
       /**
  -     * Gets the request body as a stream.
  +     * Returns the request body as a {@link java.io.InputStream}.
        * Calling this method will cause the content to be buffered.
        *
  -     * @return The request body {@link java.io.InputStream} if it has been set.
  +     * @return The request body as a {@link java.io.InputStream} if it has been set.
        */
       public InputStream getRequestBody() {
           LOG.trace("enter EntityEnclosingMethod.getRequestBody()");
  @@ -421,12 +424,12 @@
       }
   
       /**
  -     * Gets the request body as a String.
  +     * Returns the request body as a {@link java.lang.String}.
        * Calling this method will cause the content to be buffered.
        *
  -     * @return the request body as a string
  +     * @return the request body as a {@link java.lang.String}
        * 
  -     * @throws IOException when i/o errors occur reading the request
  +     * @throws IOException if I/O error occurs while reading the request body
        */
       public String getRequestBodyAsString() throws IOException {
           LOG.trace("enter EntityEnclosingMethod.getRequestBodyAsString()");
  @@ -440,16 +443,18 @@
   
   
       /**
  -     * Override method of {@link org.apache.commons.httpclient.HttpMethodBase}
  -     * to write request parameters as the request body.  The input stream will
  -     * be truncated after the specified content length.
  +     * Writes the request body to the given {@link HttpConnection connection}.
        *
  -     * @param state the client state
  -     * @param conn the connection to write to
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
        *
        * @return <tt>true</tt>
  -     * @throws IOException when i/o errors occur reading the response
  -     * @throws HttpException when a protocol error occurs or state is invalid
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        */
       protected boolean writeRequestBody(HttpState state, HttpConnection conn)
       throws IOException, HttpException {
  @@ -528,8 +533,12 @@
       }
   
       /**
  -     * Override method of {@link org.apache.commons.httpclient.HttpMethodBase}
  -     * to clear my request body.
  +     * Recycles the HTTP method so that it can be used again.
  +     * Note that all of the instance variables will be reset
  +     * once this method has been called. This method will also
  +     * release the connection being used by this HTTP method.
  +     * 
  +     * @see #releaseConnection()
        */
       public void recycle() {
           LOG.trace("enter EntityEnclosingMethod.recycle()");
  
  
  
  1.9       +11 -8     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java
  
  Index: ExpectContinueMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ExpectContinueMethod.java	30 Jul 2003 21:11:17 -0000	1.8
  +++ ExpectContinueMethod.java	9 Aug 2003 19:37:58 -0000	1.9
  @@ -191,14 +191,17 @@
       protected abstract boolean hasRequestContent();
   
       /**
  -     * Set the <tt>Expect</tt> header if it has not already been set, 
  +     * Sets the <tt>Expect</tt> header if it has not already been set, 
        * in addition to the "standard" set of headers.
        *
  -     * @param state the client state
  -     * @param conn the connection to write to
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
        *
  -     * @throws HttpException when a protocol error occurs or state is invalid
  -     * @throws IOException when i/o errors occur reading the response
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        */
       protected void addRequestHeaders(HttpState state, HttpConnection conn)
       throws IOException, HttpException {
  
  
  
  1.26      +13 -24    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java
  
  Index: GetMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- GetMethod.java	5 Jul 2003 18:43:04 -0000	1.25
  +++ GetMethod.java	9 Aug 2003 19:37:58 -0000	1.26
  @@ -68,10 +68,10 @@
   import org.apache.commons.logging.LogFactory;
   
   /**
  - * Implements the HTTP GET specification.
  + * Implements the HTTP GET method.
    * <p>
  - * The HTTP GET method is defined in section 8.1 of
  - * <a href="http://www.ietf.org/rfc/rfc1945.txt">RFC1945</a>:
  + * The HTTP GET method is defined in section 9.3 of
  + * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
    * <blockquote>
    * The GET method means retrieve whatever information (in the form of an
    * entity) is identified by the Request-URI. If the Request-URI refers
  @@ -83,22 +83,6 @@
    * <p>
    * GetMethods will follow redirect requests from the http server by default.
    * This behavour can be disabled by calling setFollowRedirects(false).</p>
  - * <p>
  - * The useDisk methods have been deprecated.  Disk I/O is the responsibility
  - * of the client.  If you need to write a response body to a file, you
  - * can use the following as an example:
  - * <pre>
  - *     out = new FileOutputStream(myFile);
  - *     InputStream in = getResponseBodyAsStream();
  - *     byte[] buffer = new byte[10000];
  - *     int len ;
  - *     while ((len = in.read(buffer)) > 0) {
  - *        out.write(buffer, 0, len);
  - *     }
  - *     in.close();
  - *     out.close();
  - * </pre>
  - * </p>
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
    * @author Sung-Gu Park
  @@ -156,7 +140,12 @@
       // ------------------------------------------------------------- Properties
   
       /**
  -     * Override recycle to reset redirects default.
  +     * Recycles the HTTP method so that it can be used again.
  +     * Note that all of the instance variables will be reset
  +     * once this method has been called. This method will also
  +     * release the connection being used by this HTTP method.
  +     * 
  +     * @see #releaseConnection()
        * 
        * @since 1.0
        */
  
  
  
  1.23      +24 -12    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java
  
  Index: HeadMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- HeadMethod.java	16 Jul 2003 20:48:28 -0000	1.22
  +++ HeadMethod.java	9 Aug 2003 19:37:58 -0000	1.23
  @@ -74,10 +74,10 @@
   import org.apache.commons.logging.LogFactory;
   
   /**
  - * Implements the HTTP HEAD specification.
  + * Implements the HTTP HEAD method.
    * <p>
  - * The HTTP HEAD method is defined in section 8.2 of 
  - * <a href="http://www.ietf.org/rfc/rfc1945.txt">RFC1945</a>:
  + * The HTTP HEAD method is defined in section 9.4 of 
  + * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
    * <blockquote>
    * The HEAD method is identical to GET except that the server MUST NOT
    * return a message-body in the response. The metainformation contained
  @@ -143,7 +143,12 @@
       }
   
       /**
  -     * Override recycle to reset redirects default.
  +     * Recycles the HTTP method so that it can be used again.
  +     * Note that all of the instance variables will be reset
  +     * once this method has been called. This method will also
  +     * release the connection being used by this HTTP method.
  +     * 
  +     * @see #releaseConnection()
        * 
        * @since 1.0
        */
  @@ -157,10 +162,17 @@
        * body, despite the presence of a <tt>Content-Length</tt> or
        * <tt>Transfer-Encoding</tt> header.
        * 
  -     * @param state shared http state
  -     * @param conn the http connection to read from
  -     * 
  -     * @throws IOException when there's an error reading data
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
  +     *
  +     * @see #readResponse
  +     * @see #processResponseBody
        * 
        * @since 2.0
        */
  
  
  
  1.21      +64 -35    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/MultipartPostMethod.java
  
  Index: MultipartPostMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/MultipartPostMethod.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- MultipartPostMethod.java	25 Jul 2003 18:29:32 -0000	1.20
  +++ MultipartPostMethod.java	9 Aug 2003 19:37:58 -0000	1.21
  @@ -80,13 +80,29 @@
   import org.apache.commons.logging.LogFactory;
   
   /**
  - * POST Method for Multipart encoded forms.
  + * Implements the HTTP multipart POST method.
  + * <p>
  + * The HTTP multipart POST method is defined in section 3.3 of
  + * <a href="http://http://www.ietf.org/rfc/rfc1867.txt">RFC1867</a>:
  + * <blockquote>
  + * The media-type multipart/form-data follows the rules of all multipart
  + * MIME data streams as outlined in RFC 1521. The multipart/form-data contains 
  + * a series of parts. Each part is expected to contain a content-disposition 
  + * header where the value is "form-data" and a name attribute specifies 
  + * the field name within the form, e.g., 'content-disposition: form-data; 
  + * name="xxxxx"', where xxxxx is the field name corresponding to that field.
  + * Field names originally in non-ASCII character sets may be encoded using 
  + * the method outlined in RFC 1522.
  + * </blockquote>
  + * </p>
  + * <p>
    *
    * @author <a href="mailto:mattalbright@yahoo.com">Matthew Albright</a>
    * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
    * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
    * @author <a href="mailto:mdiggory@latte.harvard.edu">Mark Diggory</a>
    * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  + * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
    *
    * @since 2.0
    */
  @@ -138,7 +154,8 @@
       }
   
       /**
  -     * Add a parameter
  +     * Adds a text field part
  +     * 
        * @param parameterName The name of the parameter.
        * @param parameterValue The value of the parameter.
        */
  @@ -149,7 +166,8 @@
       }
   
       /**
  -     * Add a parameter
  +     * Adds a binary file part
  +     * 
        * @param parameterName The name of the parameter
        * @param parameterFile The name of the file.
        * @throws FileNotFoundException If the file cannot be found.
  @@ -163,7 +181,7 @@
       }
   
       /**
  -     * Add a parameter.
  +     * Adds a binary file part with the given file name
        * 
        * @param parameterName The name of the parameter
        * @param fileName The file name
  @@ -179,7 +197,8 @@
       }
           
       /**
  -     * Adds another part to this post.
  +     * Adds a part.
  +     * 
        * @param part The part to add.
        */
       public void addPart (final Part part) {
  @@ -188,7 +207,7 @@
       }
   
       /**
  -     * Return all parts.
  +     * Returns all parts.
        * 
        * @return an array of containing all parts
        */
  @@ -203,9 +222,10 @@
        * @param state current state of http requests
        * @param conn the connection to use for I/O
        *
  -     * @throws IOException when errors occur reading or writing to/from the
  -     *         connection
  -     * @throws HttpException when a recoverable error occurs
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        */
       protected void addContentLengthRequestHeader(HttpState state,
                                                    HttpConnection conn)
  @@ -226,9 +246,10 @@
        * @param state current state of http requests
        * @param conn the connection to use for I/O
        *
  -     * @throws IOException when errors occur reading or writing to/from the
  -     *         connection
  -     * @throws HttpException when a recoverable error occurs
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        */
       protected void addContentTypeRequestHeader(HttpState state,
                                                    HttpConnection conn)
  @@ -262,11 +283,14 @@
        * <tt>super</tt>) to add the "standard" headers.
        * </p>
        *
  -     * @param state the client state
  -     * @param conn the {@link HttpConnection} the headers will eventually be
  -     *        written to
  -     * @throws IOException when an error occurs writing the request
  -     * @throws HttpException when a HTTP protocol error occurs
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        *
        * @see #writeRequestHeaders
        */
  @@ -280,14 +304,18 @@
       }
   
       /**
  -     * Write the request body.
  -     * 
  -     * @param state the client state
  -     * @param conn the connection to write to
  +     * Writes the request body to the given {@link HttpConnection connection}.
  +     *
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
        *
        * @return <tt>true</tt>
  -     * @throws IOException when i/o errors occur reading the response
  -     * @throws HttpException when a protocol error occurs or state is invalid
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        */
       protected boolean writeRequestBody(HttpState state, HttpConnection conn) 
       throws IOException, HttpException {
  @@ -302,23 +330,24 @@
        * <p>Return the length of the request body.</p>
        *
        * <p>Once this method has been invoked, the request parameters cannot be
  -     * altered until I am {@link #recycle recycled}.</p>
  +     * altered until the method is {@link #recycle recycled}.</p>
        * 
        * @return The request content length.
        */
  -    protected long getRequestContentLength() {
  +    protected long getRequestContentLength() throws IOException {
           LOG.trace("enter MultipartPostMethod.getRequestContentLength()");
  -        try {
  -            return Part.getLengthOfParts(getParts());
  -        } catch (IOException e) {
  -            // Can't throw an IOException and still override
  -            throw new RuntimeException(e.toString());
  -        }
  +        return Part.getLengthOfParts(getParts());
       }
   
   
       /**
  -     * Clear my request body.
  +     * Recycles the HTTP method so that it can be used again.
  +     * Note that all of the instance variables will be reset
  +     * once this method has been called. This method will also
  +     * release the connection being used by this HTTP method.
  +     * 
  +     * @see #releaseConnection()
  +     * 
        */
       public void recycle() {
           LOG.trace("enter MultipartPostMethod.recycle()");
  
  
  
  1.13      +18 -8     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/OptionsMethod.java
  
  Index: OptionsMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/OptionsMethod.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- OptionsMethod.java	2 Feb 2003 04:30:13 -0000	1.12
  +++ OptionsMethod.java	9 Aug 2003 19:37:58 -0000	1.13
  @@ -76,7 +76,7 @@
   
   
   /**
  - * Implements the HTTP OPTIONS specification.
  + * Implements the HTTP OPTIONS method.
    * <p>
    * The HTTP OPTIONS method is defined in section 9.2 of 
    * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
  @@ -179,9 +179,17 @@
       // ----------------------------------------------------- HttpMethod Methods
   
       /**
  -     * Process the response headers.
  -     * @param state The state.
  -     * @param conn The connection.
  +     * <p>
  +     * This implementation will parse the <tt>Allow</tt> header to obtain 
  +     * the set of methods supported by the resource identified by the Request-URI.
  +     * </p>
  +     *
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
  +     *
  +     * @see #readResponse
  +     * @see #readResponseHeaders
        * @since 2.0
        */
       protected void processResponseHeaders(HttpState state, HttpConnection conn) {
  @@ -206,6 +214,8 @@
        * @return true if a content-length header will be expected by the server
        *
        * @since 1.0
  +     * 
  +     * @deprecated only entity enclosing methods set content length header
        */
       public boolean needContentLength() {
           return false;
  
  
  
  1.48      +25 -21    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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- PostMethod.java	15 Jul 2003 12:46:32 -0000	1.47
  +++ PostMethod.java	9 Aug 2003 19:37:58 -0000	1.48
  @@ -76,9 +76,9 @@
   import org.apache.commons.logging.LogFactory;
   
   /**
  - * Implements the HTTP POST specification.
  + * Implements the HTTP POST method.
    * <p>
  - * The HTTP POST method is defined in section 8.3 of
  + * The HTTP POST method is defined in section 9.5 of
    * <a href="http://www.ietf.org/rfc/rfc1945.txt">RFC1945</a>:
    * <blockquote>
    * The POST method is used to request that the origin server accept the entity
  @@ -192,7 +192,7 @@
       }
   
       /**
  -     * Generates request body.
  +     * Generates the request body.
        * 
        * <p>This method must be overwritten by sub-classes that implement
        * alternative request content input methods
  @@ -215,8 +215,8 @@
   
   
       /**
  -     * Set the value of parameter with parameterName to parameterValue. Does
  -     * not preserve the initial insertion order.
  +     * Sets the value of parameter with parameterName to parameterValue. This method
  +     * does not preserve the initial insertion order.
        *
        * @param parameterName name of the parameter
        * @param parameterValue value of the parameter
  @@ -287,7 +287,7 @@
       }
   
       /**
  -     * Add a new parameter to be used in the POST request body.
  +     * Adds a new parameter to be used in the POST request body.
        *
        * @param paramName The parameter name to add.
        * @param paramValue The parameter value to add.
  @@ -309,7 +309,7 @@
       }
   
       /**
  -     * Add a new parameter to be used in the POST request body.
  +     * Adds a new parameter to be used in the POST request body.
        *
        * @param param The parameter to add.
        *
  @@ -329,7 +329,7 @@
       }
   
       /**
  -     * Add an Array of parameters to be used in the POST request body. Logs a
  +     * Adds an array of parameters to be used in the POST request body. Logs a
        * warning if the parameters argument is null.
        *
        * @param parameters The array of parameters to add.
  @@ -426,7 +426,7 @@
       }
   
       /**
  -     * Set an Array of parameters to be used in the POST request body
  +     * Sets an array of parameters to be used in the POST request body
        *
        * @param parametersBody The array of parameters to add.
        *
  @@ -446,14 +446,18 @@
       }
   
       /**
  -     * Override method of {@link org.apache.commons.httpclient.HttpMethodBase}
  -     * to  also add <tt>Content-Type</tt> header when appropriate.
  -     *
  -     * @param state the client state
  -     * @param conn the {@link HttpConnection} the headers will eventually be
  -     *        written to
  -     * @throws IOException when an error occurs writing the request
  -     * @throws HttpException when a HTTP protocol error occurs
  +     * Adds <tt>Content Type: application/x-www-form-urlencoded</tt> header
in
  +     * addition to the "standard" set of headers, if no <tt>Content Type</tt>
  +     * header has been set by the user 
  +     * 
  +     * @param state the {@link HttpState state} information associated with this method
  +     * @param conn the {@link HttpConnection connection} used to execute
  +     *        this HTTP method
  +     *
  +     * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  +     *                     can be recovered from.
  +     * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions

  +     *                    cannot be recovered from.
        *
        * @since 2.0
        */
  
  
  
  1.24      +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- PutMethod.java	2 Feb 2003 04:30:13 -0000	1.23
  +++ PutMethod.java	9 Aug 2003 19:37:58 -0000	1.24
  @@ -64,7 +64,7 @@
   package org.apache.commons.httpclient.methods;
   
   /**
  - * Implements the HTTP PUT specification.
  + * Implements the HTTP PUT method.
    * <p>
    * The HTTP PUT method is defined in section 9.6 of 
    * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
  
  
  
  1.13      +10 -6     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/TraceMethod.java
  
  Index: TraceMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/TraceMethod.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TraceMethod.java	19 Apr 2003 22:29:32 -0000	1.12
  +++ TraceMethod.java	9 Aug 2003 19:37:58 -0000	1.13
  @@ -66,7 +66,7 @@
   import org.apache.commons.httpclient.HttpMethodBase;
   
   /**
  - * Implements the HTTP TRACE specification.
  + * Implements the HTTP TRACE method.
    * <p>
    * The HTTP TRACE method is defined in section 9.6 of 
    * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
  @@ -121,8 +121,12 @@
       }
   
       /**
  +     * Recycles the HTTP method so that it can be used again.
  +     * Note that all of the instance variables will be reset
  +     * once this method has been called. This method will also
  +     * release the connection being used by this HTTP method.
        * 
  -     * Override recycle to reset redirects default.
  +     * @see #releaseConnection()
        * 
        * @since 2.0
        * 
  
  
  

Mime
View raw message