You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Yusuf Goolamabbas <yu...@outblaze.com> on 2001/05/02 06:46:35 UTC
mod_expires/7666: mod_expires doesn't take negative numbers
>Number: 7666
>Category: mod_expires
>Synopsis: mod_expires doesn't take negative numbers
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue May 01 21:50:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: yusufg@outblaze.com
>Release: 1.3.19
>Organization:
apache
>Environment:
Linux 2.2.19
gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Description:
Hi, The description of mod_expires states
<num> should be an integer value [acceptable to atoi()]
For example, I would like to write this to provide for negative expire values
make things uncacheable
ExpiresDefault "modification plus -1 hour"
The current Apache mod_expires doesn't allow this. It output's
bad expires code, numeric value expected <num
However, it allows
ExpiresDefault M-3600
The following tiny patch to mod_expires seems to allow the first config to happen and do the right thing
>How-To-Repeat:
In a stock Apache 1.3.19 with mod_expires enabled, the following line in the config file will not be accepted
ExpiresDefault "modification plus -1 hour"
However this equivalent version will be
ExpiresDefault M-3600
>Fix:
288c288
< if (('-' == word[0]) || ap_isdigit(word[0])) {
---
> if (ap_isdigit(word[0])) {
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]