You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/09/26 10:56:01 UTC
DO NOT REPLY [Bug 40607] New: - mod_log_config dumps garbage in memory when RequestHeader is used.
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: bugs@httpd.apache.org
ReportedBy: tyamadajp@list.rakugaki.org
CC: tyamadajp@list.rakugaki.org
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40607] - mod_log_config dumps garbage in memory when RequestHeader is used.
Posted by bu...@apache.org.
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
tyamadajp@list.rakugaki.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |normal
------- Additional Comments From tyamadajp@list.rakugaki.org 2006-09-26 09:08 -------
I additionally tested with other header and it also caused garbage
in access_log.
RequestHeader set XHost "hogehoge"
LogFormat "%{XHost}i" vhost_common
This means this issue isn't only limited to certain special headers,
but it's that mod_headers and mod_log_config is exclusive in some ways.
Due to this finding, I'm raising severity to "normal" now.
Also, I found out this does not happen with
Header set XHost "hogehoge"
LogFormat "%{XHost}o" vhost_common
So the issue is limited to incoming headers.
--
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org