[ 
https://issues.apache.org/jira/browse/TAP5-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Harner resolved TAP5-1858.
------------------------------

    Resolution: Duplicate

Seems to be a duplicate of TAP5-1394, although with a little better proposed 
fix.
                
> Cookie service should allow to set path, domain AND maxAge
> ----------------------------------------------------------
>
>                 Key: TAP5-1858
>                 URL: https://issues.apache.org/jira/browse/TAP5-1858
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.3.2
>            Reporter: Michael Wyraz
>
> Cookie service should allow to set path, domain AND maxAge with one method. 
> Currently there is one method for setting the path, another for cookies with 
> maxAge but none for cookies with maxAge+path.
> There should be a method like this:
>     void writeDomainCookieValue(String name, String value, String path, 
> String domain, int maxAge)
>     {
>         Cookie cookie = new Cookie(name, value);
>         if (path==null) cookie.setPath(request.getContextPath() + "/");
>         else cookie.setPath(path);
>         if (domain!=null) cookie.setDomain(domain);
>         if (maxAge!=0) cookie.setMaxAge(maxAge);
>         else cookie.setMaxAge(defaultMaxAge);
>         cookie.setSecure(request.isSecure());
>         cookieSink.addCookie(cookie);
>     }
> Each other method should call this one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to