httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hugh williams <hu...@soco.agilent.com>
Subject [users@httpd] Apache 2.2 mod_include mis-interpreting back-references
Date Wed, 22 Oct 2008 21:59:43 GMT
Hi;

I have a collection of web pages that use SSI to parse pieces of 
$DOCUMENT_NAME and present those bits in the HTML output. Here's the code:

<!--#exec cmd="echo $DOCUMENT_NAME | perl -e 'while (<>) 
{s/(\w+)_(\w+)_[_abt]{3}\..*/sprintf \"<b>%s Option %s 
Hyperlinks<\/b>\", uc $1,uc $2/e;print;}'" -->

This takes a file name like "z1234_aba_abt.html" and spits back "Z1234 
Option ABA Hyperlinks".

This works fine in both Apache 1.3.33 and 2.2.3; however 2.2.3 also send 
the following error warning into the error log:

[Wed Oct 22 14:50:00 2008] [warn] [client xxx.xxx.xxx.xxx] regex capture 
$1 refers to no regex in /users/hughw/public_html/spclhand/z
1234_aba_abt.html
[Wed Oct 22 14:50:00 2008] [warn] [client xxx.xxx.xxx.xxx] regex capture 
$2 refers to no regex in /users/hughw/public_html/spclhand/z
1234_aba_abt.html

This message is found in mod_include.c, and is not present in the Apache 
1.3 tree.

So, can someone explain to me why the error is triggered? The include 
parses perfectly and the correct results are displayed, that is, Perl 
handles things fine, but Apache apparently is trying to use the "$1" and 
"$2" for its own needs as well as letting Perl have them.

Thanks

hugh

-- 
 Hugh Williams                  "More men are killed by overwork than the
 hugh_williams@agilent.com       importance of the world justifies."
 Agilent Technologies                           - Rudyard Kipling
 Santa Rosa 4US-R                             "The Phantom Rickshaw", 1888
 (707)-577-4941



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message