r7089: ensure that headers['HOST'] is setup
authorAndrew Tridgell <tridge@samba.org>
Mon, 30 May 2005 06:22:56 +0000 (06:22 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:14 +0000 (13:17 -0500)
(This used to be commit cb896a141a028ad386d92b0beb503af657a77813)

swat/scripting/common.js

index 0691512fb2d0051f572ecec99be1b7e9951de2d3..34f5a958dacd7589f22a9cf258ce32bf91ab1ae9 100644 (file)
@@ -8,6 +8,13 @@ global.page = new Object();
 /* fill in some defaults */
 global.page.title = "Samba Web Administration Tool";
 
 /* 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" 
 */
 /*
   show the page header. page types include "plain" and "column" 
 */