String getLandingLocation(Request request, String sessionKey) {
		String host = request.header.getProperty("host");
		StringBuilder l = new StringBuilder(host.length() + 10);

		boolean ssl = request.socket instanceof SSLSocket;
		l.append("http");
		if (ssl)
			l.append('s');
		l.append("://");
		l.append(host);
		int port = request.socket.getLocalPort();
		if (ssl && port == 443)
			;
		else if (!ssl && port == 80)
			;
		else {
			String suffix = ":" + port;
			if (!host.endsWith(suffix))
				l.append(suffix);
		}
		String landingPage = landingPages.containsKey(sessionKey) ? landingPages
				.getProperty(sessionKey)
				: "/";
		l.append(landingPage);
		return l.toString();
	}