commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15443] New: - Expiration date not validated as defined in javadoc Cookie.java
Date Tue, 17 Dec 2002 15:09:19 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15443>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15443

Expiration date not validated as defined in javadoc Cookie.java

           Summary: Expiration date not validated as defined in javadoc
                    Cookie.java
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: lachiewicz@plusnet.pl


package org.apache.commons.httpclient;

field Date now

    /**
     * Create a <tt>Cookie</tt> header containing
     * all cookies in <i>cookies</i>,
     * associated with the given <i>domain</i>, <i>port</i>,
     * <i>path</i> and <i>https</i> setting, and which are
     * not expired according to the given <i>date</i>.
     * <p>
     * If no cookies match, returns null.
     * @exception java.lang.IllegalArgumentException if domain or path is null
     */

    public static Header createCookieHeader(String domain, int port, String 
path, boolean secure, Date now, Cookie[] cookies)
    throws IllegalArgumentException {
        log.trace("enter Cookie.createCookieHeader(String, int, String, 
boolean, Date, Cookie[])");
        CookieSpec matcher = CookiePolicy.getDefaultSpec();
        cookies = matcher.match(domain, port, path, secure, cookies);
        if ((cookies != null) && (cookies.length > 0))
        {
            return matcher.formatCookieHeader(cookies);
        }
        else
        {
            return null;
        }
    }

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