-/* $Id: httpd.js,v 1.35 2006/08/20 07:15:23 mmondor Exp $ */
+/* $Id: httpd.js,v 1.36 2006/08/20 20:32:42 mmondor Exp $ */
/*
* Copyright (c) 2005-2006, Matthew Mondor
* Server identification
*/
const SERVER_VERSION = 'mmondor_js_httpd/0.1.0 (NetBSD)';
-const SERVER_CVSID = '$Id: httpd.js,v 1.35 2006/08/20 07:15:23 mmondor Exp $';
+const SERVER_CVSID = '$Id: httpd.js,v 1.36 2006/08/20 20:32:42 mmondor Exp $';
}
/*
- * Verify if client sent a session cookie, and if it consists of a
- * valid one, load session data.
- * XXX Needs to be loaded off the application server if needed, but
- * nothing to do otherwise other than make sure it's valid and be able
- * to associate SID->FD
- */
- /*
- if (this.http_vhost.appserver != undefined &&
- (sessid = this.http_vars_cookies['SessionID']) != undefined &&
- (sess = sessions_table[sessid]) != undefined &&
- sess.expires > time)
- this.http_sessid = sessid;
- */
-
- /*
* Fill in associative array with any GET-style supplied
* variables (as part of the URL). We want this even for POST method.
*/
try {
fd.close();
} catch (x) {}
- if (this.http_vhost.index.charAt(1) == '/') {
+ if (this.http_vhost.index.charAt(0) == '/') {
/* Recompute since index is fullpath */
if (!(path = this.http_vhost.htdocs_root.
valid_virtual(this.http_vhost.index)))
error = true;
} else {
/* Append index path and retry */
- path.real += this.http_vhost.index;
- path.virtual += this.http_vhost.index;
+ path.real += '/' + this.http_vhost.index;
+ path.virtual += '/' + this.http_vhost.index;
}
/*
'access the resource ' + path.virtual +
'.');
return PSTAT_CLOSE_SUCCESS;
- }
+ } else
+ this.http_path = path.virtual;
}
}
* Verifies if property name ends with [], which considers it as an array of
* values which are then pushed into that array.
* Sets the property normally otherwise.
+ * XXX We probably need additional parsing here, i.e. to replace %<nn>
*/
function property_add(obj, prop, val)
{
-/* $Id: options.js,v 1.23 2006/08/20 07:31:48 mmondor Exp $ */
+/* $Id: options.js,v 1.24 2006/08/20 20:32:42 mmondor Exp $ */
var ilibprefix = "/home/mmondor/work/mmondor/mmsoftware/js/jslib/";
default_vhost: "appserv.pulsar-zone.net",
default_mimetype: "application/octet-stream",
default_charset: "us-ascii",
- default_index: "/index.html",
+ default_index: "index.html",
ban_msie: false,
ban_windows: false
};
"appserv.ginseng.xisop"
],
root: "/home/data/jshttpd/appserv",
- index: "/index.html",
+ index: "/app/index",
appserv: {
paths_cache_max: 64,
/* URL patterns redirected to js-appserv (regexp) */
"mmondor.ginseng.xisop"
],
root: "/home/data/jshttpd/mmondor",
- index: "/index.html",
charset: "iso-8859-1"
}
];