Return -1 from getDateHeader() when request is restored.

Other certain container will attempt to access date (such as when
checking If-Modified-Since header)  and fail when accessing restored
request. The javax.servlet.http.HttpServletRequest#getDateHeader()
javadocs indicate that -1 should be returned when date is not available
This commit is contained in:
Peter Donald 2016-07-12 16:28:45 +10:00
parent 3a370e2726
commit c283f9803c

View file

@ -192,7 +192,7 @@ public class FilterSessionStore implements AdapterSessionStore {
@Override
public long getDateHeader(String name) {
if (!needRequestRestore) return super.getDateHeader(name);
throw new RuntimeException("This method is not supported in a restored authenticated request");
return -1;
}
@Override