Author: pete Date: Tue May 3 21:10:17 2011 New Revision: 1099249 URL: http://svn.apache.org/viewvc?rev=1099249&view=rev Log: return null for date header when servlet api returns -1
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?rev=1099249&r1=1099248&r2=1099249&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Tue May 3 21:10:17 2011 @@ -211,7 +211,14 @@ public class ServletWebRequest extends W @Override public Time getDateHeader(String name) { - return Time.valueOf(httpServletRequest.getDateHeader(name)); + long value = httpServletRequest.getDateHeader(name); + + if (value == -1) + { + return null; + } + + return Time.valueOf(value); } @Override