httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Annoying unusual bug.
Date Tue, 11 Jan 2000 19:26:48 GMT
> > So, my solution:
> > add a char *protocol to the request_rec, and have it default to http.
> > When the request comes in, if it is anything else, we overwrite this
> > default.  This also keeps the SSL modules from having to provide this
> > field in the record (I have been told most of them provide it, but I
> > haven't checked yet).  This would allow us to register the protocols, and
> > the rest of the algorithm works properly.
> > 
> > Any other thoughts?  If not, I will implement this for Apache 2.0 very
> > soon.
> Yeah. It should be a hook, surely? In Apache-SSL, ap_default_port(r)
> determines the appropriate port (by examining stuff in the conn_rec,
> ISTR), but the generic way is for ap_default_port() to be a hook, and
> for protocol modules to hook it.

I don't think it should be a hook.  Why should multiple modules implement
a function that basically returns an integer?  Plus, how would we know
which protocol module should be used?  We don't want to check if the port
used is a default for ANY known protocol, we really want to know if the
current port is the default port for the current protocol. I was basically
going to:

add   ap_register_protocol(proto, port)   /* adds info to a global table*/
in ap_construct_url grab the default port from the global table and check
it against the current port.

I think the ap_register_protocol function should be called from the
register_hooks functions, but it should not be implemented like the other
hooks are.

Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

View raw message