https://issues.apache.org/bugzilla/show_bug.cgi?id=49131
Summary: Very long URLs cause 404 or 403 errors with SetAction,
RewriteRule, RedirectMatch...
Product: Apache httpd-2
Version: 2.2.11
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
We've got a virtual host set up where all requests are redirected to a cgi
script using SetAction
<Virtualhost *:80>
ServerName mytest
DocumentRoot /var/www/mytest
Options +ExecCGI
Action all /index.cgi virtual
<Location /index.cgi>
SetHandler cgi-script
</Location>
SetHandler all
</Virtualhost>
... where index.cgi is just a small example that prints the environment
#!/bin/sh
echo Content-Type: text/plain
echo
printenv
This works ok for small URLs such as
http://mytest/abc.html
However, for very long URLs, weird stuff happens. Often we get a 404, and
sometimes a 403.
http://mytest/01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
It really looks like some kind of buffer overrun...
Same thing with RewriteRule:
<Virtualhost *:80>
ServerName mytest
DocumentRoot /var/www/mytest
RewriteEngine on
RewriteRule /.* /index.cgi [L]
</Virtualhost>
and:
<Virtualhost *:80>
ServerName mytest
DocumentRoot /var/www/mytest
RedirectMatch /............* /index.cgi
</Virtualhost>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]