httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: module configs across (pseudo) connections
Date Wed, 24 Jun 2015 13:26:10 GMT
On 22 Jun 2015, at 2:48 PM, Stefan Eissing <stefan.eissing@greenbytes.de> wrote:

> Eric, thanks for the help! When enabling mod_logio it became immediately clear that mod_h2
wrongly prevented some pre_connection hooks to run. mod_logio however expects its allocated
module config to be there when a request gets cleaned up... So, with v0.7.2 all pre_conn hooks
are run again and it is part of my test setup now.
> 
> Which adds the issue about proper handling of module configurations in pseudo connections.
There seem to be two approaches:
> a) treat pseudo connections like real ones -> run all connection hooks 
> b) treat them as "shadows" of the real connection -> copy module configs
> 
> While a) is the least dangerous, it misses gives a false impression about the properties
of a connection. For example, mod_h2 currently copies over the mod_ssl config, so that SSL
variables are available during request processing on pseudo connections. On the other hand,
code is not really prepared for b) since this means that many threads may operate on the same
module config.
> 
> So, mod_h2 now follow a) for now (with the exception of mod_ssl). A future proposal for
pseudo connections will need to reevaluate this.

I would argue that the copying option above is most dangerous, as this has side effects that
may not be catered for by pool cleanups.

I believe we should be treating the “pseudo” connections as real connections, and perhaps
by linking a “subconnection” to a “connection” (c->main) in the same way we currently
link a subrequest to a request (r->main).

If you run into any blockers while doing this I would argue those blockers would be bugs and
we want to fix them.

Regards,
Graham
—


Mime
View raw message