I am also using Mozilla.
I hope this patch is acceptable for CVS tree.
Can I commit this patch ?

Deleting 'Expires' header from 'private' mode is another option,
but, it may causes backward compatiblitiy problem.

Rui


Yasuo Ohgaki wrote:

> When 'private' cache limitter is used, old enough
> "Expire" header is added. Recent Mozilla retris to
> submit post data with back button and may result in
> empty form.
> 
> From RFC2616 13.2.1 Server-Specified Expiration
> ===
> If an origin server wishes to force a semantically transparent
> cache to validate every request, it MAY assign an explicit
> expiration time in the past. This means that the response is
> always stale, and so the cache SHOULD validate it before using it
> for subsequent requests. See section 14.9.4 for a more restrictive
> way to force revalidation.
> ===
> 
> Validation can be avoided without "Expire" header.
> 
> It would be nice to have private cache limitter without
> Expire header. Could you apply attached diff (or like) to
> session.c? The diff file is taken against today's CVS
> HEAD branch.
> 
> Thank you.
> 
> --
> Yasuo Ohgaki
> 
> 
> ------------------------------------------------------------------------
> 
> Index: session.c
> ===================================================================
> RCS file: /repository/php4/ext/session/session.c,v
> retrieving revision 1.259
> diff -u -c -r1.259 session.c
> cvs server: conflicting specifications of output style
> *** session.c 22 Oct 2001 16:07:34 -0000      1.259
> --- session.c 30 Oct 2001 02:48:32 -0000
> ***************
> *** 676,681 ****
> --- 676,691 ----
>       last_modified(TSRMLS_C);
>   }
>   
> + CACHE_LIMITER_FUNC(private_no_expire)
> + {
> +     char buf[MAX_STR + 1];
> +     
> +     sprintf(buf, "Cache-Control: private, max-age=%ld, pre-check=%ld", 
>PS(cache_expire) * 60, PS(cache_expire) * 60);
> +     ADD_COOKIE(buf);
> + 
> +     last_modified(TSRMLS_C);
> + }
> + 
>   CACHE_LIMITER_FUNC(nocache)
>   {
>       ADD_COOKIE("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
> ***************
> *** 688,693 ****
> --- 698,704 ----
>   static php_session_cache_limiter_t php_session_cache_limiters[] = {
>       CACHE_LIMITER(public)
>       CACHE_LIMITER(private)
> +     CACHE_LIMITER(private_no_expire)
>       CACHE_LIMITER(nocache)
>       {0}
>   };
> 



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to