httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r708902 - /httpd/httpd/trunk/modules/metadata/mod_expires.c
Date Mon, 03 Nov 2008 17:24:40 GMT

On Nov 1, 2008, at 6:54 AM, Ruediger Pluem wrote:

>
> This causes failures in the perl framework:
>
> t/modules/expires.t                92   15  16.30%  4 10 14 17-18 22  
> 29-30 34-
>                                                    35 38 42 46 48 50
>
> But IMHO the code is now correct after the patch and the tests are  
> wrong. The following
> patch makes the tests pass again:
>
> Index: t/modules/expires.t
> ===================================================================
> --- t/modules/expires.t (Revision 707830)
> +++ t/modules/expires.t (Arbeitskopie)
> @@ -231,6 +231,13 @@
>     if ($exp_conf =~ /^([A|M])(\d+)$/) {
>         $exp_type = $1;
>         $expected = $2;
> +        ## With modification date as base expire times can be in  
> the past
> +        ## Correct behaviour for the server in this case is to set  
> expires
> +        ## time equal to access time.
> +        if (($exp_type eq 'M')
> +            && ($headers{access} > $headers{modified} + $expected)) {
> +            $expected = $headers{access} - $headers{modified};
> +        }
>     } else {
>         print STDERR "\n\ndoom: $exp_conf\n\n";
>         return 0;
>
> Comments?
>

Thanks! I forgot to mention that the test cases were bad, and had  
intended
to fix them, but time got away from me. Thanks for following
up!

+1


Mime
View raw message