You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by re...@apache.org on 2003/11/22 00:37:05 UTC

cvs commit: httpd-2.0/modules/metadata mod_expires.c

rederpj     2003/11/21 15:37:05

  Modified:    .        CHANGES
               modules/metadata mod_expires.c
  Log:
  mod_expires: Don't report an Internal Server error if ExpiresDefault
  is used and has not been set in the httpd.conf file. PR: 23748, 24459
  
  Submitted: Liam Quinn  <liam htmlhelp.com>
  Reviewed: Paul J. Reder
  
  Revision  Changes    Path
  1.1321    +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1320
  retrieving revision 1.1321
  diff -u -r1.1320 -r1.1321
  --- CHANGES	21 Nov 2003 15:02:04 -0000	1.1320
  +++ CHANGES	21 Nov 2003 23:37:05 -0000	1.1321
  @@ -2,6 +2,10 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_expires: Don't report an Internal Server error if ExpiresDefault
  +     is used and has not been set in the httpd.conf file. PR: 23748, 24459
  +     [Liam Quinn  <liam htmlhelp.com>]
  +
     *) mod_logio: Account for some bytes handed to the network layer prior to
        dropped connections.  [Jeff Trawick]
   
  
  
  
  1.47      +2 -1      httpd-2.0/modules/metadata/mod_expires.c
  
  Index: mod_expires.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_expires.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mod_expires.c	2 Jun 2003 13:14:44 -0000	1.46
  +++ mod_expires.c	21 Nov 2003 23:37:05 -0000	1.47
  @@ -548,7 +548,8 @@
                   expiry = conf->expiresdefault;
               }
           }
  -        if (expiry != NULL) {
  +        /* != '\0' covers the case where ExpiresDefault is not user defined. */
  +        if (expiry != NULL && expiry[0] != '\0') {
               set_expiration_fields(r, expiry, t);
           }
       }
  
  
  

Re: cvs commit: httpd-2.0/modules/metadata mod_expires.c

Posted by "Paul J. Reder" <re...@remulak.net>.
Ooops, I didn't see the second one and the first was similar to the one
I came up with to resolve PR 24459. Sure, I'll change it to the second
solution. I agree that it is a better solution.

André Malo wrote:
> * rederpj@apache.org wrote:
> 
> 
>>  Index: mod_expires.c
>>  ===================================================================
>>  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_expires.c,v
>>  retrieving revision 1.46
>>  retrieving revision 1.47
>>  diff -u -r1.46 -r1.47
>>  --- mod_expires.c	2 Jun 2003 13:14:44 -0000	1.46
>>  +++ mod_expires.c	21 Nov 2003 23:37:05 -0000	1.47
>>  @@ -548,7 +548,8 @@
>>                   expiry = conf->expiresdefault;
>>               }
>>           }
>>  -        if (expiry != NULL) {
>>  +        /* != '\0' covers the case where ExpiresDefault is not user
>>  defined. */+        if (expiry != NULL && expiry[0] != '\0') {
>>               set_expiration_fields(r, expiry, t);
>>           }
>>       }
> 
> 
> Ah, would you mind to use the other patch provided in the PR? IMHO the other
> one addresses more the problem than the symptom.
> 
> nd
> 
> 

-- 
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein



Re: cvs commit: httpd-2.0/modules/metadata mod_expires.c

Posted by André Malo <nd...@perlig.de>.
* rederpj@apache.org wrote:

>   Index: mod_expires.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_expires.c,v
>   retrieving revision 1.46
>   retrieving revision 1.47
>   diff -u -r1.46 -r1.47
>   --- mod_expires.c	2 Jun 2003 13:14:44 -0000	1.46
>   +++ mod_expires.c	21 Nov 2003 23:37:05 -0000	1.47
>   @@ -548,7 +548,8 @@
>                    expiry = conf->expiresdefault;
>                }
>            }
>   -        if (expiry != NULL) {
>   +        /* != '\0' covers the case where ExpiresDefault is not user
>   defined. */+        if (expiry != NULL && expiry[0] != '\0') {
>                set_expiration_fields(r, expiry, t);
>            }
>        }

Ah, would you mind to use the other patch provided in the PR? IMHO the other
one addresses more the problem than the symptom.

nd