Author: olegk Date: Sat Jun 3 11:47:47 2006 New Revision: 411453 URL: http://svn.apache.org/viewvc?rev=411453&view=rev Log: [HTTPCLIENT-582] Allow access to registered cookie policies
Contributed by Sebastian Bazley Reviewed by Roland Weber and Oleg Kalnichevski Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=411453&r1=411452&r2=411453&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original) +++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Sat Jun 3 11:47:47 2006 @@ -1,5 +1,8 @@ Changes toward 3.1 + * [HTTPCLIENT-582] - Allow access to registered cookie policies + Contributed by Sebastian Bazley <sebb at apache.org> + * 19102 - Added support for Set-Cookie2 response headers Contributed by Samit Jain <jain.samit at gmail.com> Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java?rev=411453&r1=411452&r2=411453&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 Sat Jun 3 11:47:47 2006 @@ -319,5 +319,19 @@ public static CookieSpec getCompatibilitySpec() { return getSpecByPolicy(COMPATIBILITY); } + + /** + * Obtains the currently registered cookie policy names. + * + * Note that the DEFAULT policy (if present) is likely to be the same + * as one of the other policies, but does not have to be. + * + * @return array of registered cookie policy names + * + * @since 3.1 + */ + public static String[] getRegisteredCookieSpecs(){ + return (String[]) SPECS.keySet().toArray(new String [SPECS.size()]); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]