Author: hlship
Date: Mon Sep 8 10:55:50 2008
New Revision: 693177
URL: http://svn.apache.org/viewvc?rev=693177&view=rev
Log:
TAPESTRY-1796: Not all writeCookieValue functions honor the
tapestry.default-cookie-max-age symbol
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java?rev=693177&r1=693176&r2=693177&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java
Mon Sep 8 10:55:50 2008
@@ -88,17 +88,14 @@
{
Cookie cookie = new Cookie(name, value);
cookie.setPath(path);
+ cookie.setMaxAge(defaultMaxAge);
cookieSink.addCookie(cookie);
}
public void writeDomainCookieValue(String name, String value, String
domain)
{
- Cookie cookie = new Cookie(name, value);
- cookie.setPath(request.getContextPath() + "/");
- cookie.setDomain(domain);
-
- cookieSink.addCookie(cookie);
+ writeDomainCookieValue(name, value, domain, defaultMaxAge);
}
public void writeDomainCookieValue(String name, String value, String
domain, int maxAge)
@@ -116,6 +113,7 @@
Cookie cookie = new Cookie(name, value);
cookie.setPath(path);
cookie.setDomain(domain);
+ cookie.setMaxAge(defaultMaxAge);
cookieSink.addCookie(cookie);
}