httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Rothe <andre.ro...@zks.uni-leipzig.de>
Subject Change the content-length header for other filters
Date Wed, 21 Dec 2016 21:10:00 GMT
Hi,

I have a filter, which changes the content length of a POST request.
There are some key-value-pairs of the request, which the filter removes
before other filters process the request.

But after my filter completes the request processing, I'll get:

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

I have tried to change the header key "Content-Length" and set the
new value like:

apr_table_set(f->r->headers_in, "Content-Length",
    apr_psprintf(f->r->pool, "%ld", len));

but it has no effect outside of my filter. The incoming request has a
content length of 1107 bytes. I modify the bucket brigade and it
contains at the end of my filter code only 1074 bytes (which is also
stored into "len").

What can I do to send the new content length along the filter chain?

Thank you
André


Mime
View raw message