From 1cada765202cb6e229ece1f3fab29076471a7e13 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 29 May 2005 11:16:45 +0000 Subject: r7070: fix redirection when the client doesn't send a 'Host' header metze (This used to be commit ccc4d51927eb1564c6f5de07dda83dd008bb8a9e) --- swat/index.esp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'swat/index.esp') diff --git a/swat/index.esp b/swat/index.esp index 037e88836c..373bd9f74e 100644 --- a/swat/index.esp +++ b/swat/index.esp @@ -7,7 +7,11 @@ redirecting you to the test pages ... <% if (server['SERVER_PROTOCOL'] == "http" && server['TLS_SUPPORT'] == "True") { - redirect("https://" + headers['HOST'] + request['REQUEST_URI']); + if (headers['HOST']) { + redirect("https://" + headers['HOST'] + request['REQUEST_URI']); + } else { + redirect("https://" + server['SERVER_NAME'] + ":" + server['SERVER_PORT'] + request['REQUEST_URI']); + } } else { redirect("esptest/index.esp"); } -- cgit