httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian J. France" <>
Subject Re: HTTP trailers?
Date Fri, 23 Apr 2010 15:25:17 GMT

On Apr 23, 2010, at 10:08 AM, William A. Rowe Jr. wrote:

> On 4/23/2010 9:03 AM, Brian J. France wrote:
>> You can build a module that is able to insert a trailer by adding a filter and ap_hook_create_request
> But doesn't this defeat the purpose of using a modular server
> architecture?  It seems this should be a facility of the core HTTP
> filter, if anyone wants to offer the patch for 2.3.

I agree, my module was more of a proof of concept that I can do it and then get some other
server to able able to use it.

Not sure what the best solution would be because multiple things need to happen.  First part
is you have to force chunk encoding either by removing content_length filter or tweaking the
code to not add it if doing a trailer (which you might not know until it is time to insert
a tailer).

Then you have to tweak modules/http/chunk_filter.c to allow others to insert a trailer, like
adding a ap_hook_http_trailer or a optional function for inserting it.  I don't know if multiple
modules should be allowed to add a trailer, if you do how to you join them since a trailer
is nothing but a string ending with ASCII_CRLF (just strcat?).  Should we just grab r->notes['http_trailer']
and let modules just add/set/append values?

I think there is a bigger design discussion that should happen, but I might have a patch down
the road as a starter if all goes well at work.


View raw message