commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r356822 - in /jakarta/commons/proper/httpclient/trunk: src/java/org/apache/commons/httpclient/cookie/ src/java/org/apache/commons/httpclient/methods/ xdocs/
Date Wed, 14 Dec 2005 18:08:49 GMT
Author: olegk
Date: Wed Dec 14 10:08:35 2005
New Revision: 356822

URL: http://svn.apache.org/viewcvs?rev=356822&view=rev
Log:
Various javadoc / xdoc fixes (PR #37805, #37208, #37207)

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookieSpec.java
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/StringRequestEntity.java
    jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java?rev=356822&r1=356821&r2=356822&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java
Wed Dec 14 10:08:35 2005
@@ -47,6 +47,7 @@
  *   management practices (even if they are not 100% standards compliant)
  *   <li><tt>NETSCAPE</tt>: Netscape cookie draft compliant
  *   <li><tt>RFC_2109</tt>: RFC2109 compliant (default)
+ *   <li><tt>IGNORE_COOKIES</tt>: do not automcatically process cookies
  *  </ul>
  * 
  * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
@@ -206,10 +207,10 @@
 
     /**
      * @return default cookie policy
-     *  <tt>(COMPATIBILITY | NETSCAPE_DRAFT | RFC2109)</tt>
      * 
-     * @deprecated Use {@link CookiePolicy#getCookieSpec(String)}
-     * @see #DEFAULT 
+     * @deprecated Use {@link #getDefaultSpec()}
+     * 
+     * @see #getDefaultSpec()
      */
     public static int getDefaultPolicy() {
         return defaultPolicy;
@@ -218,7 +219,6 @@
 
     /**
      * @param policy new default cookie policy
-     *  <tt>(COMPATIBILITY | NETSCAPE_DRAFT | RFC2109)</tt>
      * 
      * @deprecated Use {@link CookiePolicy#registerCookieSpec(String, Class)}
      * @see #DEFAULT 
@@ -230,7 +230,6 @@
     /**
      * @param policy cookie policy to get the CookieSpec for
      * @return cookie specification interface for the given policy
-     *  <tt>(COMPATIBILITY | NETSCAPE_DRAFT | RFC2109)</tt>
      * 
      * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} 
      */

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookieSpec.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookieSpec.java?rev=356822&r1=356821&r2=356822&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookieSpec.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookieSpec.java
Wed Dec 14 10:08:35 2005
@@ -60,6 +60,11 @@
 
     /**
       * Parse the <tt>"Set-Cookie"</tt> header value into Cookie array.
+      * 
+      * <p>This method will not perform the validation of the resultant
+      * {@link Cookie}s</p> 
+      *
+      * @see #validate(String, int, String, boolean, Cookie)
       *
       * @param host the host which sent the <tt>Set-Cookie</tt> header
       * @param port the port which sent the <tt>Set-Cookie</tt> header
@@ -77,6 +82,11 @@
 
     /**
       * Parse the <tt>"Set-Cookie"</tt> Header into an array of Cookies.
+      *
+      * <p>This method will not perform the validation of the resultant
+      * {@link Cookie}s</p> 
+      *
+      * @see #validate(String, int, String, boolean, Cookie)
       *
       * @param host the host which sent the <tt>Set-Cookie</tt> header
       * @param port the port which sent the <tt>Set-Cookie</tt> header

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/StringRequestEntity.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/StringRequestEntity.java?rev=356822&r1=356821&r2=356822&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/StringRequestEntity.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/methods/StringRequestEntity.java
Wed Dec 14 10:08:35 2005
@@ -53,10 +53,20 @@
     /** The content type (i.e. text/html; charset=EUC-JP). */
     private String contentType;
     
-
     /**
-     * Creates a new entity with the given content
+     * <p>Creates a new entity with the given content. This constructor 
+     * will use the default platform charset to convert the content string 
+     * and will provide no content type.</p>
      *  
+     * <p>This constructor may be deprecated or changed to use the 
+     * default HTTP content charset (ISO-8859-1) in the release 3.1</p>
+     * 
+     * <p>It is strongly recommended to use 
+     * {@link #StringRequestEntity(String, String, String)} constructor 
+     * instead.</p>
+     * 
+     * @see #StringRequestEntity(String, String, String)
+     * 
      * @param content The content to set.
      */
     public StringRequestEntity(String content) {

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml?rev=356822&r1=356821&r2=356822&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml Wed Dec 14 10:08:35 2005
@@ -54,6 +54,8 @@
         <p>RFC2109 is available at
         <a href="http://www.w3.org/Protocols/rfc2109/rfc2109.txt">http://www.w3.org/Protocols/rfc2109/rfc2109.txt</a>
         </p>
+
+        <p>RFC2109 is the default cookie policy used by HttpClient.</p>
       </subsection>
 
       <subsection name="Browser Compatibility">
@@ -121,6 +123,20 @@
         ]]></source>
       </subsection>
       -->
+    </section>
+
+    <section name="Manual handling of cookies">
+      <p>The cookie management API of HttpClient can co-exist with the manual 
+      cookie handling. One can manually set request <code>Cookie</code> 
+      headers or process response <code>Set-Cookie</code> headers in addition

+      or instead of the automatic cookie management</p>
+
+        <source><![CDATA[
+        HttpMethod method = new GetMethod();
+        method.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
+        method.setRequestHeader("Cookie", "special-cookie=value");
+        ]]></source>
+
     </section>
 
     <section name="Common Problems">



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


Mime
View raw message