httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Bad request returned for chunked HTTP post
Date Thu, 23 Dec 2004 21:59:27 GMT
"Ron Avriel" <ravriel@hotmail.com> writes:

[...]

> I traced down the problem to:
>
> apreq_filter(0x008bf778, 0x008bfc30, 1, 0, 0) line 558
> ap_get_brigade(0x008bf778, 0x008bfc30, 1, 0, 0) line 475 + 32 bytes
> ap_rgetline_core(0x00f3fc04, 8192, 0x00f3fbfc, 0x008bdd58, 0,
> 0x008bfc30) line 215 + 27 bytes
> ap_get_mime_headers_core(0x008bdd58, 0x008bfc30) line 688 + 36 bytes
> ap_get_mime_headers(0x008bdd58) line 836
> ap_http_filter(0x008bed58, 0x008bf920, 0, 0, 8192) line 1559
> ap_get_brigade(0x008bed58, 0x008bf920, 0, 0, 8192) line 475 + 32 bytes
> net_time_filter(0x008be9d0, 0x008bf920, 0, 0, 8192) line 3668
> ap_get_brigade(0x008be9d0, 0x008bf920, 0, 0, 8192) line 475 + 32 bytes
> apreq_filter(0x008bf778, 0x008bf920, 0, 0, 8192) line 578 + 35 bytes
> ap_get_brigade(0x008bf778, 0x008bf920, 0, 0, 8192) line 475 + 32 bytes
> apreq_request_test_handler(0x008bdd58) line 235 + 33 bytes

Notice that the httpd filter is reentering the entire input filter chain.
This is a bug in ap_http_filter/ap_get_mime_headers; please report it
to dev@httpd.

We can certainly work around it though; see if this patch helps.

Index: env/mod_apreq.c
===================================================================
--- env/mod_apreq.c	(revision 123167)
+++ env/mod_apreq.c	(working copy)
@@ -560,6 +560,8 @@
     case AP_MODE_EXHAUSTIVE:
         /* only the modes above are supported */
         break;
+    case AP_MODE_GETLINE: /* punt- chunks are b0rked in ap_http_filter */
+        return ap_get_brigade(f->next, bb, mode, block, readbytes);
     default:
         return APR_ENOTIMPL;
     }


-- 
Joe Schaefer


Mime
View raw message