You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jeremy Laidman <JP...@ACSLink.net.au> on 1997/11/14 06:44:53 UTC
mod_proxy/1415: POSTs with Content-Length: header have any trailing CRLF stripped from body
>Number: 1415
>Category: mod_proxy
>Synopsis: POSTs with Content-Length: header have any trailing CRLF stripped from body
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Nov 13 21:50:01 PST 1997
>Last-Modified:
>Originator: JPLaidman@ACSLink.net.au
>Organization:
apache
>Release: 1.2.4
>Environment:
Linux 2.0.14
>Description:
Not really an Apache problem, but other proxies don't behave the same way
and so it looks bad for Apache.
A CRLF in a POST body is probably not a requirement in HTTP/1.x, however
some clients transmit it (Communicator) and some servers expect it (Oracle).
Even though the body length matches the Content-length: header, the server
in question fails to proceed with the request.
>How-To-Repeat:
Connect to:
http://www.transigo.net.au/transigo/pp_dirs_su_registration1.org_entry_page
And click the Submit button. The server waits forever to proceed.
>Fix:
Perhaps include a ServerMatch rule to add a CRLF to the end of a POST body.
This patch seems to work, but should be checked by a REAL C programmer:
*** ../../../../apache_1.2.4/src/modules/proxy/proxy_http.c Thu Aug 21 12:44
:30 1997
--- proxy_http.c Fri Nov 14 14:15:44 1997
***************
*** 275,280 ****
--- 275,284 ----
{
while ((i = get_client_block(r, buffer, HUGE_STRING_LEN)) > 0)
bwrite(f, buffer, i);
+ /* JPL - send CRLF if not at end of buffer */
+ if (i >= 2 && buffer[i-2] != CR || buffer[i-1] != LF) {
+ bputs("\015\012", f);
+ }
}
bflush(f);
kill_timeout(r);
%0
>Audit-Trail:
>Unformatted: