-/* $Id: httpd.js,v 1.17 2005/07/07 00:11:30 mmondor Exp $ */
+/* $Id: httpd.js,v 1.18 2005/07/07 00:20:00 mmondor Exp $ */
/*
* Copyright (c) 2005, Matthew Mondor
* Server identification
*/
SERVER_VERSION = 'mmondor_js_httpd/0.0.1 (NetBSD)';
-SERVER_CVSID = '$Id: httpd.js,v 1.17 2005/07/07 00:11:30 mmondor Exp $';
+SERVER_CVSID = '$Id: httpd.js,v 1.18 2005/07/07 00:20:00 mmondor Exp $';
*/
if (o.name == undefined || o.root == undefined)
throw ('name and root properties missing from vhost');
+ o.name = o.name.toLowerCase();
this.name = o.name;
if (o.scripts != undefined && o.scripts == true)
if (o.aliases != undefined) {
for (i in o.aliases) {
+ o.aliases[i] = o.aliases[i].toLowerCase();
if (vhosts_table[o.aliases[i]] != undefined)
throw ('Conflicting vhost alias: ' +
o.aliases[i]);
*/
if (vhost == '' || vhosts_table[vhost] == undefined)
vhost = options.default_vhost;
- this.http_vhost = vhosts_table[vhost];
+ this.http_vhost = vhosts_table[vhost.toLowerCase()];
/*
* Fill in associative array with any GET-style supplied
exit();
}
if (vhosts_table[options.default_vhost] != undefined)
- default_vhost = vhosts_table[options.default_vhost];
+ default_vhost =
+ vhosts_table[options.default_vhost.toLowerCase()];
else {
err.put('Default vhost ' + options.default_vhost +
" unkonwn, exiting\n");