diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-05-29 11:16:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:12 -0500 |
commit | 1cada765202cb6e229ece1f3fab29076471a7e13 (patch) | |
tree | fa342204b40c595ab3cb0a39a4946fcc17375680 | |
parent | 21f3a3921c03777beb7e3072152ae33956b38807 (diff) | |
download | samba-1cada765202cb6e229ece1f3fab29076471a7e13.tar.gz samba-1cada765202cb6e229ece1f3fab29076471a7e13.tar.bz2 samba-1cada765202cb6e229ece1f3fab29076471a7e13.zip |
r7070: fix redirection when the client
doesn't send a 'Host' header
metze
(This used to be commit ccc4d51927eb1564c6f5de07dda83dd008bb8a9e)
-rw-r--r-- | swat/index.esp | 6 |
1 files changed, 5 insertions, 1 deletions
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"); } |