1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Fix processing of the TRACE method. Previously we passed bogus

parms to form_header_field() and it overlaid some vhost structures,
resulting in a segfault in check_hostalias().
[Greg Ames, Jeff Trawick]

Note: Not being familiar with the TRACE method I compared the 2.0
output with 1.3.9 output.  The only difference is that with 2.0 we
get a Content-Length header field.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89138 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2001-05-17 18:04:18 +00:00
parent f167e62d06
commit 551ecb9a9a
3 changed files with 16 additions and 42 deletions

View File

@@ -940,6 +940,8 @@ static char *make_allow(request_rec *r)
AP_DECLARE(int) ap_send_http_trace(request_rec *r)
{
int rv;
apr_bucket_brigade *b;
header_struct h;
/* Get the original request */
while (r->prev)
@@ -952,11 +954,14 @@ AP_DECLARE(int) ap_send_http_trace(request_rec *r)
/* Now we recreate the request, and echo it back */
ap_rvputs(r, r->the_request, CRLF, NULL);
b = apr_brigade_create(r->pool);
apr_brigade_putstrs(b, NULL, NULL, r->the_request, CRLF, NULL);
h.pool = r->pool;
h.bb = b;
apr_table_do((int (*) (void *, const char *, const char *))
form_header_field, (void *) r, r->headers_in, NULL);
ap_rputs(CRLF, r);
form_header_field, (void *) &h, r->headers_in, NULL);
apr_brigade_puts(b, NULL, NULL, CRLF);
ap_pass_brigade(r->output_filters, b);
return OK;
}