nginx page caching not working for responses with valid (rfc 1123 compliant) Expires header

Valentin V. Bartenev vbart at
Tue Mar 10 20:10:09 UTC 2015

On Tuesday 10 March 2015 14:42:41 Kunal Pariani wrote:
> Hello, 
> I am on nginx-1.7.1 & trying to use nginx's page caching feature but run into an issue for responses with a valid 'Expires' header which seem to be in the correct rfc 1123 compliant format. Nginx somehow doesn't like it & hence doesn't cache such responses. Is this a bug ? 

How is RFC 1123 related to the Expires header?

> 2015/03/10 13:58:29 [debug] 17311#0: *7 http proxy header: "Expires: Thu, 9 Apr 2015 19:58:29 GMT"

It's wrong, it has only one digit day.  See RFC 7231 for details:

  wbr, Valentin V. Bartenev

More information about the nginx mailing list