You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Adam Sussman <my...@vishnu.vidya.com> on 2001/12/29 02:23:01 UTC

[PATCH] mod_proxy segfault

This patch addresses a segmentation fault that occurs in mod_proxy when the
proxied server returns either a bogus header line or a HTTP/0.9 response.

-adam


Index: modules/proxy/proxy_http.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_http.c,v
retrieving revision 1.114
diff -u -r1.114 proxy_http.c
--- proxy_http.c	19 Dec 2001 16:32:01 -0000	1.114
+++ proxy_http.c	29 Dec 2001 00:10:46 -0000
@@ -801,7 +801,7 @@
         /* Is it an HTTP/0.9 response? If so, send the extra data */
         if (backasswards) {
             apr_ssize_t cntr = len;
-            e = apr_bucket_heap_create(buffer, cntr, 0);
+            e = apr_bucket_heap_create(buffer, cntr, 1);
             APR_BRIGADE_INSERT_TAIL(bb, e);
         }