You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Alexander Lazic <al...@none.at> on 2002/10/23 20:40:13 UTC
Possiblebug in mod_rewrite %{ENV:vars}
Hi,
i have tested the apache 2.0.43 with mod_rewrite and can't expand the
%{ENV:SSL_CIPHER} nor %{ENV:GATEWAY_INTERFACE} in the '/cgi-bin/'-dir.
I think i have found the possible failure/bug in the function
'do_expand' on line 2433 in mod_rewrite.c:
span = apr_cpystrn(outp, lookup_variable(r, var), space) - outp;
due the fact that i'am not very familiar with the apr/apache-function i
hope the maintainer can remove the bug ;-))
I have add the following line in my 'mod_rewrite.c' for debugging
purpose:
rewritelog(r, 4, "do_expand VarIn='%s'\n", var);
rewritelog(r, 4, "do_expand Varout='%s'\n", outp);
rewritelog(r, 4, "do_expand Space='%d'\n", space);
rewritelog(r, 4, "do_expand Span='%d'\n", span);
My Setup:
./configure --prefix=/opt/apache2 --with-mpm=worker --enable-rewrite --enable-ssl
# pwd
/opt/apache2
# bin/httpd -v
Server version: Apache/2.0.43
Server built: Oct 23 2002 17:06:02
# bin/httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_ssl.c
worker.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgid.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c
from ssl.conf:
RewriteEngine On
RewriteLog logs/rewrite.log
RewriteLogLevel 9
RewriteCond %{ENV:SSL_CIPHER} ^RC4-SHA* [OR]
RewriteCond %{ENV:SSL_PROTOCOL} ^TLSv1* [OR]
RewriteCond %{ENV:GATEWAY_INTERFACE} ^CGI/1.1*
RewriteRule ^/cgi-bin/printenv* /cgi-bin/test-cgi
al ;-)