httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37025] New: - mod_proxy_http corrupts HTTP/0.9 binary data
Date Tue, 11 Oct 2005 18:06:42 GMT
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=37025>.
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=37025

           Summary: mod_proxy_http corrupts HTTP/0.9 binary data
           Product: Apache httpd-2.0
           Version: 2.0.54
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: prestonj@bitheads.com


I have a bunch of small webservers running under the HTTP/0.9 protocol. When
binary data (ie jpg files) is requested via an apache proxy server, the data
comes back missing a few bytes (2 missing bytes in apache 2.0.47 and 1 missing
byte in apache 2.0.54). 

According to section 6 of the HTTP1.0/0.9 protocol:
http://www.faqs.org/rfcs/rfc1945.html
"A Simple-Response should only be sent in response to an HTTP/0.9
   Simple-Request or if the server only supports the more limited
   HTTP/0.9 protocol. If a client sends an HTTP/1.0 Full-Request and
   receives a response that does not begin with a Status-Line, it should
   assume that the response is a Simple-Response and parse it
   accordingly. Note that the Simple-Response consists only of the
   entity body and is terminated by the server closing the connection."

>From my investigation, it looks like mod_proxy is trying to read the first
LF-terminated line of the response and parse it as if it were an http header.
Specifically the call to function "ap_getline(...)" in proxy_http.c function
"ap_proxy_http_process_response(...)" will alter the buffer by throwing away the
LF character (ie hex 0A). This works fine if the response has an http header (or
is completely text based). However binary data becomes corrupted during this
process. So it would seem that the HTTP/0.9 protocol is not fully supported by
mod_proxy.

-- 
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


Mime
View raw message