DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40607>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40607 Summary: mod_log_config dumps garbage in memory when RequestHeader is used. Product: Apache httpd-2 Version: 2.0.55 Platform: PC OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: mod_headers AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] With following configuration, I see Apache dumping random memory content to access_log instead of expected "Host:" header content: RequestHeader set Host "hogehoge" LogFormat "%{Host}i" vhost_common CustomLog /var/log/apache2/access.log vhost_common Sometimes it's a "(null)" (glibc-way of saying you're accessing NULL), sometimes it's a text fragment from unknown memory area. Why would I want to manipulate "Host:" header anyway? I was trying to rewrite incoming Host: header in order to normalize document root path set with "VirtualDocumentRoot". Ultimately, I wanted to do somethig like below: RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.+) [NC] RewriteRule - - [E=REALHOST:%1] RequestHeader set Host "%{REALHOST}e" env=REALHOST # use normalized hostname to obtain vhost docroot VirtualDocumentRoot /docroot/%1/%2/htdocs You can accomplish similar result by redirecting client to normalized URL, but that would cost additional roundtrip. I know I'm doing something tricky here, so I'll report it as minor. Also, after some code reviews, I gues this isn't feasible anyway as mod_headers hooks into fixup stage whereas mod_vhost_alias hooks into translations stage. I just wish if I could hook mod_headers into some stage earlier... -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
