[Geoserver-devel] [jira] Created: (GEOS-2300) Provide Expires header with Cache-Control: max-age

Provide Expires header with Cache-Control: max-age
--------------------------------------------------

                 Key: GEOS-2300
                 URL: http://jira.codehaus.org/browse/GEOS-2300
             Project: GeoServer
          Issue Type: Improvement
          Components: WMS
    Affects Versions: 1.6.5
            Reporter: Ivan S. Dubrov
            Assignee: Andrea Aime

For better compatibility with HTTP/1.0 clients, I suggest adding Expires: header with max-age. It's perfectly fine with RFC (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3).

Something like this added to GetMapResponse:

Date expires = new Date();
expires.setTime(date.getTime() + maxAge * 1000);
DateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
format.setTimeZone(TimeZone.getTimeZone("GMT"));
responseHeaders.put("Expires", format.format(expires));

This is not a big deal, but will improve interaction with cache servers that use HTTP/1.0.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira