# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1255043739 -3600
# Node ID 85d51cea2c4c2ef42f392e35bb82ac652cd60fcd
# Parent  2c295826a96d49ef52caaf144f8fbe146c618812
componentmanager: Fix oops in pattern for matching subdomain

diff -r 2c295826a96d -r 85d51cea2c4c core/componentmanager.lua
--- a/core/componentmanager.lua	Thu Oct 08 23:51:55 2009 +0100
+++ b/core/componentmanager.lua	Fri Oct 09 00:15:39 2009 +0100
@@ -75,7 +75,7 @@
 		-- We need to find SSL context to use...
 		-- Discussion in prosody@ concluded that
 		-- 1 level back is usually enough by default
-		local base_host = host:gsub("^[^%.]+", "");
+		local base_host = host:gsub("^[^%.]+%.", "");
 		if hosts[base_host] then
 			ssl_ctx = hosts[base_host].ssl_ctx;
 		end