httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Rothe <>
Subject Chunked request
Date Fri, 23 Sep 2016 10:59:54 GMT

I try to understand an request filter (input). Maybe you can help me to
understand the processes:

The POST size of a request is larger than 8192 bytes, so the request
will be split up into two pieces. I need both parts to process the
request within the filter. There are further filters, which process the
request too.

My filter calls ap_get_brigade() and tries to get the bytes. The brigade
will be stored within a context structure of the ap_filter_t.

On the first call of my filter it gets only 8192 bytes and no EOS. As
the next, I'm looking for EOS, if there isn't one, I try to store the
buckets with

apr_bucket_setaside(b, f->r->pool);

and return from the filter with APR_SUCCESS. I think, there should be a
further call of my filter hook with the second chunk. There I would
concat the stored brigade with the new one. If there isn't an EOS too,
store the whole brigade again. But is there an EOS, I can process the

What I have to send on the first call to the next filter (nothing,
flush)? At the moment I get an

Sending error response: The request contained fewer content data than
specified by the content-length header

within the error_log and the client gets a 404. So it seems, that a
filter should be informed, that my filter waits for further chunks and
passes the chunks together to the next filter after the second call.

Any ideas?

Thank you.

View raw message