You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Peter Djalaliev <pe...@cs.pitt.edu> on 2005/09/23 18:44:54 UTC

where exactly in the code does Apache first detect https connections?

Where does the Apache web server first detect that a request is over HTTPS?
I can't find the specific place in the source code where this is done
(assuming a specific place exists).

The SSL connection is established in mod_ssl, but how is this code first
invoked?  All the hooks in mod_ssl are registered with the AP_HOOK_MIDDLE
arguments, how does Apache ensure that they handle the HTTPS connection,
instead of some other module or hook?

I guess that the code can detect when a request is over HTTPS just by
looking at the beginning of the URL (if it is absolute); I also know that
there exists a HTTPS environment variable, even though I couldn't find any
documentation about when it is set and when it is used.

I looked at the code in the ssl and http Apache modules, as well as the
request.c file in the 'server' directory of the source code, but I can't
find what I need.



Re: where exactly in the code does Apache first detect https connections?

Posted by Greg Ames <gr...@apache.org>.
Peter Djalaliev wrote:
> Where does the Apache web server first detect that a request is over HTTPS?
> I can't find the specific place in the source code where this is done
> (assuming a specific place exists).

my (non-expert) guess: shortly after the request is mapped to an IP 
based virtual host which has a port designated for SSL and SSLEngine on 
configured.

Greg