summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-30 06:22:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:14 -0500
commit575ebb4c7fedbe3a6ff50344d6f2fcd893ac3e07 (patch)
treec60499a6e751959fd3f68620f70bc7a3a35d0917 /swat
parentca6b9f370bbd37b58dbec55c7b369d72a4684918 (diff)
downloadsamba-575ebb4c7fedbe3a6ff50344d6f2fcd893ac3e07.tar.gz
samba-575ebb4c7fedbe3a6ff50344d6f2fcd893ac3e07.tar.bz2
samba-575ebb4c7fedbe3a6ff50344d6f2fcd893ac3e07.zip
r7089: ensure that headers['HOST'] is setup
(This used to be commit cb896a141a028ad386d92b0beb503af657a77813)
Diffstat (limited to 'swat')
-rw-r--r--swat/scripting/common.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
index 0691512fb2..34f5a958da 100644
--- a/swat/scripting/common.js
+++ b/swat/scripting/common.js
@@ -8,6 +8,13 @@ global.page = new Object();
/* fill in some defaults */
global.page.title = "Samba Web Administration Tool";
+
+/* if the browser was too dumb to set the HOST header, then
+ set it now */
+if (headers['HOST'] == undefined) {
+ headers['HOST'] = server['SERVER_HOST'] + ":" + server['SERVER_PORT'];
+}
+
/*
show the page header. page types include "plain" and "column"
*/