You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Tony Finch <fa...@demon.net> on 1998/08/10 18:34:51 UTC
general/2819: errors detected when parsing the headers aren't sent to the client
>Number: 2819
>Category: general
>Synopsis: errors detected when parsing the headers aren't sent to the client
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Aug 10 09:40:00 PDT 1998
>Last-Modified:
>Originator: fanf@demon.net
>Organization:
apache
>Release: 1.3.1
>Environment:
I found the error when hacking 1.3b3 on Solaris 2.6, but the same problem
exists in 1.3.1 as is obvious from a code inspection.
>Description:
get_mime_headers() in src/main/http_protocol.c can generate errors, e.g.
when a malformed header (without a colon) or when too many headers are
supplied if you have patched it against the recent denail of service attack.
In this situation, the error is collected in a buffer but the buffer is not
flushed. This is because the flushing is usually left to child_main() in
src/main/http_main.c, but child_main() only does this if read_request()
returns non-NULL, which is not the case when get_mime_headers() causes an
error.
>How-To-Repeat:
$ telnet localhost http
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.0
foo
bar
Connection closed by foreign host.
$
>Fix:
add
ap_bflush(r->connection->client);
before the error return from get_mime_headers().
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]