]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Fix a seg fault. The problem is easy to explain. On a HEAD request, Good
authorRyan Bloom <rbb@apache.org>
Sat, 27 Jan 2001 18:23:49 +0000 (18:23 +0000)
committerRyan Bloom <rbb@apache.org>
Sat, 27 Jan 2001 18:23:49 +0000 (18:23 +0000)
commitcab9a19107cecdf9d0d80225cf8e9d7df6559e0d
treee571cb92ff0790517121715bb23076ed64feb959
parentad3749bf854dd955ce24bd5ee5754f577b3271ca
Fix a seg fault.  The problem is easy to explain.  On a HEAD request, Good
handlers will send their data down the filter stack, but 1.3 handlers will
just return, giving us a Content-Length of 0.  Since we can't send a C-L
of 0 just because it is a HEAD request, we search the headers_out table
for a 0 C-L if it is a HEAD request.  The problem is that some filters
will not allow (includes_filter) a C-L to be computed, so we end up without
a C-L header in headers_out.  Thus, when we do a strcmp against the header
value and "0", we seg fault, because the header value is NULL.

To fix this, we grab the element from the header table, and make sure it
isn't NULL before doing the strcmp.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87870 13f79535-47bb-0310-9956-ffa450edef68
modules/http/http_protocol.c