Bug 23998 - mod_proxy truncates status line header causing warning in log files
Summary: mod_proxy truncates status line header causing warning in log files
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.0.47
Hardware: PC All
: P3 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://article.gmane.org/gmane.comp.a...
Depends on:
Reported: 2003-10-22 11:15 UTC by Marco Muishout
Modified: 2005-03-20 17:06 UTC (History)
0 users

fix for trailing space handling (1.29 KB, patch)
2003-10-22 16:14 UTC, Joe Orton
Details | Diff
Apache error log file, including 'warning' bug (34.51 KB, text/plain)
2003-10-23 15:00 UTC, Marco Muishout
Apache error log file, bug fixed using supplied patch (no more warning) (34.31 KB, text/plain)
2003-10-23 15:01 UTC, Marco Muishout

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Muishout 2003-10-22 11:15:26 UTC
Client requests JSP page to local apache server (2.0.47). Local apache server 
forwards mod_proxy) this request to a central apache server (2.0.47) which is 
connected by mod_jk2 (2.0.2) to tomcat 4.1.24.
When the local apache server receives its response, the request-response status 
line is malformed and a warning is generated in the apache error log file. 

The JSP application works fine, but our log files are clogged with these 
warnings as every JSP request generates one. We are talking about a major 
enterprise-wide global system.

Examining this problem showed that the error is caused by the fact that 
mod_proxy is cleaning up/ignoring the trailing space in the status 
line:"HTTP/1.1 200 ". It only seems to see or evaluate "HTTP/1.1 200". 

I read that mod_jk omits the reponse-phrase ("OK" in this case) but this should 
(according to standards) not be a problem when at least a trailing space is 
added. By tracing the connactions I can see the 'space' in the response status 
line before it enters apache.

Either mod_proxy filters out the space or the incoming status line is 
incorrectly evaluated.

The error message is generated in 
httpd-2.0.47/modules/proxy/proxy_http.c   line 761

For more information, please check 
Comment 1 Joe Orton 2003-10-22 13:19:30 UTC
Thanks for the report.  Yes, ap_rgetline is stripping any trailing spaces.  The
proxy should just fix it and not be so noisy - I'll attach a patch.
Comment 2 Joe Orton 2003-10-22 16:14:18 UTC
Created attachment 8666 [details]
fix for trailing space handling
Comment 3 Marco Muishout 2003-10-23 14:59:41 UTC
I tested the fix that was supplied and everything works OK. I attached two 
error log files - one showing the warning, and one which shows the warning is 
Both error log files were recorded while requesting the default application jsp 
in out environment, with the apache mod_proxy instance running in debug mode.
Comment 4 Marco Muishout 2003-10-23 15:00:53 UTC
Created attachment 8690 [details]
Apache error log file, including 'warning' bug
Comment 5 Marco Muishout 2003-10-23 15:01:37 UTC
Created attachment 8691 [details]
Apache error log file, bug fixed using supplied patch (no more warning)
Comment 6 Jeff Trawick 2003-11-21 22:39:20 UTC
fyi... fix already in 2.1-dev, recently approved for merge into stable branch
for 2.0.next
Comment 7 Erik Abele 2003-11-29 03:43:38 UTC
As Jeff already noted, this is fixed.