*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 11 Jul 2005 01:59:21 +0000 (01:59 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 11 Jul 2005 01:59:21 +0000 (01:59 +0000)
tests/js-test/js/httpd/httpd.js

index c00641b..b949954 100644 (file)
@@ -1,4 +1,4 @@
-/* $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();
@@ -113,14 +121,6 @@ eval(file_read('root.js'));                /* Root object for virtual chroot(2) */
 
 
 /*
- * 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;
@@ -912,8 +912,6 @@ FD.prototype.httpRespond = function(time)
        }
 
        /*
-        * 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) {
@@ -1167,7 +1165,7 @@ function property_add(obj, prop, val)
        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)