httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: filtered I/O - flow control
Date Thu, 01 Jun 2000 20:12:49 GMT

> Given that all "body output" will come through ap_r*(), we can fix Apache
> to automatically call ap_send_http_header(). This would allow the content
> generator and the filters to monkey with the headers right up to the last
> moment. It also means people don't have to worry about calling
> ap_send_http_header() any more, which can be a bonus.

This is exactly what I said.

> > In this design, there is no reason for
> > the filters to "wake up" once the socket is ready for more data, because
> > they weren't executing when the data was being written to the socket.
> 
> In the link-based approach, each layer is defined as:
> 
> struct ap_layer_t {
>     ap_layer_func_t *callback;  /* callback to process a write */
>     void *ctx;                  /* context for callback */
>     struct ap_layer_t *next;    /* next layer to call */
>     request_rec *r;             /* associated request for this layer */
> };
> 
> The callback prototype is:
> 
> ap_status_t my_callback(ap_layer_t *this_layer, const void *buf, size_t len);
> 
> I am not sure how the hook-based mechanism would record state. I presume
> that it would set "user data" on the request_rec.

The module would be responsible for maintaining state, using functions
provided by Apache.  Of course, it would be reasonablly simple to add that
to the loop that calls the state with minimal changes to the macro.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message