httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <...@apache.org>
Subject Re: Change the content-length header for other filters
Date Thu, 22 Dec 2016 01:05:29 GMT
On Wed, 2016-12-21 at 22:10 +0100, André Rothe wrote:

> 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

Sorin's reply is part of the story, and may or may not be useful
in your case.

The basic issue you have to consider is that the headers arrive before
the body, and a handler that cares about Content-Length is likely
to have read it before your filter has reset it.

The alternative - read and buffer the entire body before starting
to process it - becomes hopelessly inefficient for large requests.

There's some discussion of the issue in the mod_proxy docs,
as mod_proxy has an option to support HTTP/1.0 backends that
need an explicit Content-Length.

-- 
Nick Kew


Mime
View raw message