1) Actual HTTP headers from a sinatra app that calls Sinatra::Helpers.expires
HTTP/1.1 200 OK
Expires: Thu, 25 Nov 2010 14:03:54 GMT
Last-Modified: Fri, 22 Oct 2010 11:03:26 GMT
Server: thin 1.2.7 codename No Hup
Date: Tue, 26 Oct 2010 16:35:24 GMT
X-Varnish: 1175818610 1175810556
Via: 1.1 varnish
2) RFC 2616
3.3.2 Delta Seconds
Some HTTP header fields allow a time value to be specified as an
integer number of seconds, represented in decimal, after the time
that the message was received.
delta-seconds = 1*DIGIT
3) A brief exploration with irb
4) A suggested fix would be to add .to_i when setting max_age
5) I apologise for the lack of a proper test and patch but I am under deadline pressure. Hopefully you can find the bug on the information I've given
Yeah, this should be sufficient, thanks.
Make sure max-age is an integer (as specified by RFC2616). Closed by 1bee791.