www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rodrigo campos <camp...@uol.com.br>
Subject mod_rewrite/9686: faulty perl script
Date Fri, 01 Feb 2002 18:49:04 GMT

>Number:         9686
>Category:       mod_rewrite
>Synopsis:       faulty perl script
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          doc-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 01 10:50:00 PST 2002
>Originator:     camposr@uol.com.br
>Release:        1.3.x
apache site
The perl script used to generate an ndbm file listed as an example at mod_rewrite documentation
page does not treat comment and 'all space' correctly lines due to the fact that the s metacharacter
is not escaped

the use of dbmopen is deprecated

dbmopen does not regenerate all records, creating an "always append" condition
look at http://httpd.apache.org/docs/mod/mod_rewrite.html
right after the RewriteMap directive

##  txt2dbm -- convert txt map to dbm format

use NDBM_File;
use Fcntl;

($txtmap, $dbmmap) = @ARGV;
open(TXT, "<$txtmap");
tie (%DB, 'NDBM_File', $dbmmap,O_RDWR|O_TRUNC|O_CREAT, 0644);
while (<TXT>) {
    next if (m|^\s*#.*| or m|^\s*$|);
    $DB{$1} = $2 if (m|^\s*(\S+)\s+(\S+)$|);
untie %DB;
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@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!     ]

View raw message