Opened 12 years ago

Closed 12 years ago

#102 closed defect (invalid)

Странности с If-Modified-Since

Reported by: Максим Щелоков Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.0.x
Keywords: proxy_cache, if-modified since Cc:
uname -a: Linux x86_64
nginx -V: nginx version: nginx/1.0.11
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6

Description

Конфигурация следующая:
if_modified_since before, используется кэширование проксированных ответов.
Запрашивается определенный файл, кэшируется ответ с Last-Modified: Fri, 15 Jul 2011 16:52:30 GMT

Далее, спрашиваем файл с разными If-Modified-Since, результаты ниже (запрос-ответ):

If-Modified-Since: Sat, 11 Feb 2012 10:18:15 GMT -- HTTP/1.1 304 Not Modified
If-Modified-Since: Fri, 10 Feb 2012 10:19:26 GMT -- HTTP/1.1 304 Not Modified
If-Modified-Since: Thu, 9 Feb 2012 10:19:44 GMT -- HTTP/1.1 200 OK
If-Modified-Since: Wed, 11 Jan 2012 10:20:06 GMT -- HTTP/1.1 304 Not Modified

Не совсем понятно, почему третий результат - 200, когда все они, вплоть до Last-Modified должны быть 304.

Change History (1)

comment:1 by Maxim Dounin, 12 years ago

Resolution: invalid
Status: newclosed

The If-Modified-Since header have to follow HTTP-date syntax, and the line with "Thu, 9 Feb 2012 ..." isn't correct due to 1-digit day.

Note: See TracTickets for help on using tickets.