From 575ebb4c7fedbe3a6ff50344d6f2fcd893ac3e07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 May 2005 06:22:56 +0000 Subject: [PATCH] r7089: ensure that headers['HOST'] is setup (This used to be commit cb896a141a028ad386d92b0beb503af657a77813) --- swat/scripting/common.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/swat/scripting/common.js b/swat/scripting/common.js index 0691512fb2d..34f5a958dac 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" */ -- 2.34.1