summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"
*/