-/* $Id: httpd.js,v 1.52 2005/07/11 01:50:56 mmondor Exp $ */
+/* $Id: httpd.js,v 1.53 2005/07/11 01:59:21 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.53 2005/07/11 01:59:21 mmondor Exp $';
+
+
+
+/*
* Open standard error FD for diagnostics output
*/
err = new FD();
/*
- * Server identification
- */
-SERVER_VERSION = 'mmondor_js_httpd/0.0.1 (NetBSD)';
-SERVER_CVSID = '$Id: httpd.js,v 1.52 2005/07/11 01:50:56 mmondor Exp $';
-
-
-
-/*
* Client states (enumeration)
*/
const STATE_TRANSFER_READ = 1;
}
/*
- * Verify if document consists of a .jso (server javascript module)
- * file, part of a dynamic HTTP application.
* Extract file extension, as well as its mime type.
*/
if ((i = path.virtual.lastIndexOf('.')) != -1) {
prop = unescape(prop.replace(/\+/g, ' '));
val = unescape(val.replace(/\+/g, ' '));
- if (prop.lastIndexOf('[]') == prop.length - 2) {
+ if (prop.endsWith('[]')) {
/* Array entry */
prop = prop.substring(0, prop.length - 2);
if (obj[prop] == undefined)