I do not understand of this thing.
Could you please tell me if I have already connection between browser and
apache server why I should use request_rec->output_filters instead of
request_rec->connection->output_filters?

I thought that if connection is established than request_rec->connection
should be used, right?

regards
Petr


2009/9/15 Graham Leggett <minf...@sharp.fm>

> Petr Hracek wrote:
>
> > in my apache module (written in C) are sended data to the client side
> > over buckets and brigades.
> > Function for send these date is:
> > apr_status_t send_data_to_client(request_rec *r, char * data_to_send,
> > int length_data)
> > {
> >     apr_bucket_brigade * bb =
> > apr_brigade_create(r->pool,r->connection->bucket_alloc);
> >     apr_bucket * b =
> >
> apr_bucket_immortal_create(data_to_send,length_data,r->connection->bucket_alloc);
> >     APR_BRIGADE_INSERT_TAIL(bb,b);
> >     ap_pass_brigade(r->connection->output_filters,bb);
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >     return OK;
> > }
> >
> > It is working but in the traces of application which receive the data
> > from apache module the HTTP data are in reverse order.
>
> At a quick glance, I would blame the line highlighted above - you are
> trying to write your data directly to the connection filters, rather
> than to the request filters. By doing that, your data is sent before the
> request, not after, and so you see your data before the headers, not after.
>
> Regards,
> Graham
> --
>

Reply via email to