aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2009-01-04 15:52:40 +0000
committerGravatar Nokis Mavrogiannopoulos 2009-01-04 15:52:40 +0000
commit56f36286c885bf4e3d53083dcc32ba6eb4a0797f (patch)
treedfc55e4974593b4e6adae806529705791872daf1 /src
parent1a53be1fbb3fe4461cfcb94ccadbf42324d00dd6 (diff)
Added patch to fix issue with mod_proxy. Investigation and patch by Alain Knaff.
It seems that the reason for this behavior is that the mgs_hook_pre_connection is being called both for incoming and outgoing (mod_proxy) connections. The attached patch (mod_proxy.patch) tries to find out in which case we are, and returns OK without doing anything if it is an outgoing connection. The method of telling both cases apart (namely, checking whether remote address' hostname is set) may seem somewhat hackish, but it does work, even if HostnameLookups is set to On. If ever there is a problem with this method, we might need to check local port instead (whether it is 443), but that would break if a non-standard https port was used.
Diffstat (limited to 'src')
-rw-r--r--src/gnutls_hooks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c
index 3fa7041..e671a60 100644
--- a/src/gnutls_hooks.c
+++ b/src/gnutls_hooks.c
@@ -686,6 +686,10 @@ int mgs_hook_pre_connection(conn_rec * c, void *csd)
686 return DECLINED; 686 return DECLINED;
687 } 687 }
688 688
689 if(c->remote_addr->hostname)
690 /* Connection initiated by Apache (mod_proxy) => ignore */
691 return OK;
692
689 ctxt = create_gnutls_handle(c->pool, c); 693 ctxt = create_gnutls_handle(c->pool, c);
690 694
691 ap_set_module_config(c->conn_config, &gnutls_module, ctxt); 695 ap_set_module_config(c->conn_config, &gnutls_module, ctxt);