You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/11/08 13:33:10 UTC
DO NOT REPLY [Bug 14386] New: -
Date headers corrupted using setDateHeader
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=14386>.
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=14386
Date headers corrupted using setDateHeader
Summary: Date headers corrupted using setDateHeader
Product: Tomcat 3
Version: 3.2.x Nightly
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: philip@rsuk.com
Create a jsp:
<%
long now = System.currentTimeMillis();
response.setDateHeader("TestDateHeader", now + 14*24*60*60*1000);
%>
<%=new java.util.Date(now)%>
When requested, the following will be returned:
HTTP/1.0 200 OK
Content-Type: text/html;charset=ISO-8859-1
TestDateHeader: Fri, 22 Nov 2002 12:25:56 GMT
Date: Fri, 22 Nov 2002 12:25:56 GMT
Servlet-Engine: Tomcat Web Server/3.2.4 (JSP 1.1; Servlet 2.2; Java 1.3.1;
Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
X-Cache: MISS from sonic.rsuk.com
Proxy-Connection: close
Fri Nov 08 12:25:56 GMT 2002
The Date header is incorrectly set to the value of the TestDateHeader header
rather than the current date.
Change the jsp to replace 14*24*60*60*1000 with 16*24*60*60*1000. The following
content will now be returned:
HTTP/1.0 200 OK
Content-Type: text/html;charset=ISO-8859-1
TestDateHeader: Sun, 24 Nov 2002 12:28:04 GMT
Date: Fri, 08 Nov 2002 12:28:04 GMT
Servlet-Engine: Tomcat Web Server/3.2.4 (JSP 1.1; Servlet 2.2; Java 1.3.1;
Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
X-Cache: MISS from sonic.rsuk.com
Proxy-Connection: close
Fri Nov 08 12:28:04 GMT 2002
Both the Date and TestDateHeader headers are now set correctly.
I have also noticed other problems when setting more than one date header. All
the date headers will often take the value of one of them.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>