httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: SSL support
Date Sun, 04 Feb 2001 16:45:40 GMT

> > > However, I've immediately hit a problem - SSL requires the ability to
> > > write when its reading and read when its writing, if you see what I
> > > mean. Now, I really wanted to slot it in as a filter, which means that
> > > the read filter has to be able to send stuff to the write filter chain
> > > (well, insert stuff, more to the point) and vice versa. I can't
> > > immediately see how that's possible, if it is at all. Is it? Should it
> > > be?
> > 
> > I don't understand what you want to do.  Do you want to write something to
> > the socket as you are reading, or do you want to setup some data to be
> > written as you start to write the output?
> > 
> > If the latter, just delay inserting the output_filter until you are in the
> > input filter, and then you can insert the output filter with a ctx pointer
> > that has the data you want to write.
> 
> Unfortunately, its the former :-) And vice versa (hmm ... just possibly
> we can get away with not doing this variant, actually). And it goes on
> all the time, not just at startup.

Okay, so why can't you just do that.  What I mean is something like the
following in your input filter (and conversly in the output filter)

apr_status_t ssl_input_filter(ap_filter_t *f, apr_brigade *bb)
{

    ap_bucket *b = APR_BRIGADE_LAST(bb);
    ap_bucket_socket *bs = b->data;
   

    if (APR_BUCKET_IS_SOCKET(b)) {
        ap_bucket_read(...);
        apr_send(bs->socket, ...);
    }
}

The idea is above, but the names are almost definately wrong.  You are
writing a filter at a level low-enough that you will need to actually get
information out of the bucket itself.

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


Mime
View raw message