Welcome! Log In Create A New Profile

Advanced

Re: [Patch] proxy cache for 304 Not Modified

September 22, 2011 06:08PM
May be this make a config for user to choose accept copy to compliant
with RFC2616?

2011/9/23 Woon Wai Keen <doubleukay@doubleukay.com>:
> On 2011-09-19 6:47 PM, Maxim Dounin wrote:
>>
>> Additional question to consider: what should happen if original
>> 200 reply comes with "Cache-Control: max-age=<seconds>" (or
>> "Expires:<time>").  Should we use it?  Or should we use another
>> one from 304 reply?
>>
>> Please provide rationale based on RFC2616.
>
> I'm most interested in this point you raised.
>
> Excerpt from RFC2616 13.5.3 (snipped only the relevant parts):
>>
>>   If the status code is 304 (Not Modified), the cache uses the entity-
>>   body stored in the cache entry as the entity-body of this outgoing
>>   response.
>>
>>   The end-to-end headers stored in the cache entry are used for the
>>   constructed response, except that
>>
>>      - any end-to-end headers provided in the 304 or 206 response MUST
>>        replace the corresponding headers from the cache entry.
>
> Due to this, we need to read the cached headers, merge it with upstream
> headers, write the updated cache to a temp file and replace the existing
> one.
>
> To avoid the copy IO for some specific use cases where 304s won't have
> consequential header updates, it can be sufficient to just update valid_sec.
> Of course this would be highly uncompliant with RFC2616...
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>



--
MagicBear

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[Patch] proxy cache for 304 Not Modified

ビリビリⅤ 2965 September 15, 2011 01:56PM

Re: [Patch] proxy cache for 304 Not Modified

Maxim Dounin 907 September 16, 2011 11:54AM

Re: [Patch] proxy cache for 304 Not Modified

magicbear 1910 September 16, 2011 04:36PM

Re: [Patch] proxy cache for 304 Not Modified

Maxim Dounin 743 September 19, 2011 06:48AM

Re: [Patch] proxy cache for 304 Not Modified

magicbear 1150 September 19, 2011 12:50PM

Re: [Patch] proxy cache for 304 Not Modified

Maxim Dounin 841 September 21, 2011 02:02PM

Re: [Patch] proxy cache for 304 Not Modified

magicbear 1009 September 21, 2011 04:34PM

Re: [Patch] proxy cache for 304 Not Modified

Woon Wai Keen 822 September 22, 2011 05:00PM

Re: [Patch] proxy cache for 304 Not Modified

magicbear 889 September 22, 2011 06:08PM

Re: [Patch] proxy cache for 304 Not Modified

magicbear 1494 September 25, 2011 03:20PM

Re: [Patch] proxy cache for 304 Not Modified

Woon Wai Keen 791 September 19, 2011 04:28PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready