*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 20 Aug 2006 20:32:42 +0000 (20:32 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 20 Aug 2006 20:32:42 +0000 (20:32 +0000)
mmsoftware/js/js-sh/app/httpd/httpd.js
mmsoftware/js/js-sh/app/httpd/options.js

index 884ff01..2e2f5e3 100644 (file)
@@ -1,4 +1,4 @@
-/* $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
@@ -76,7 +76,7 @@
  * 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 $';
 
 
 
@@ -843,21 +843,6 @@ FD.prototype.parseQuery = function(time)
        }
 
        /*
-        * 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.
         */
@@ -1016,15 +1001,15 @@ FD.prototype.httpRespond = function(time)
                        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;
                        }
 
                        /*
@@ -1051,7 +1036,8 @@ FD.prototype.httpRespond = function(time)
                                    'access the resource ' + path.virtual +
                                    '.');
                                return PSTAT_CLOSE_SUCCESS;
-                       }
+                       } else
+                               this.http_path = path.virtual;
                }
        }
 
@@ -1508,6 +1494,7 @@ FD.prototype.httpDebug = function()
  * 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)
 {
index beed4fb..e1ff89e 100644 (file)
@@ -1,4 +1,4 @@
-/* $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/";
 
@@ -14,7 +14,7 @@ var options = {
        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
 };
@@ -45,7 +45,7 @@ var vhosts = [
                                "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) */
@@ -77,7 +77,6 @@ var vhosts = [
                                "mmondor.ginseng.xisop"
                ],
                root:           "/home/data/jshttpd/mmondor",
-               index:          "/index.html",
                charset:        "iso-8859-1"
        }
 ];