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

index a331cac..884ff01 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: httpd.js,v 1.34 2006/08/20 06:47:34 mmondor Exp $ */
+/* $Id: httpd.js,v 1.35 2006/08/20 07:15:23 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.34 2006/08/20 06:47:34 mmondor Exp $';
+const SERVER_CVSID = '$Id: httpd.js,v 1.35 2006/08/20 07:15:23 mmondor Exp $';
 
 
 
@@ -714,6 +714,7 @@ FD.prototype.parseQuery = function(time)
        this.http_vars_get = {};
        this.http_vars_post = {};
        this.http_vars_cookies = {};
+       this.http_vars_cookies_count = 0;
        this.http_agent = '';
        this.http_content_length = -1;
        this.http_modified_since = undefined;
@@ -761,9 +762,11 @@ FD.prototype.parseQuery = function(time)
                                vhost = words[1];
                        } else if (words[0] == 'Cookie:') {
                                words = (lines[i].substr(8)).split('=');
-                               if (words.length == 2)
+                               if (words.length == 2) {
                                        property_add(this.http_vars_cookies,
                                            words[0], words[1]);
+                                       this.http_vars_cookies_count++;
+                               }
                        } else if (words[0] == 'User-Agent:') {
                                this.http_agent = lines[i].substr(12);
                                if (options.ban_msie == true &&
@@ -1058,7 +1061,7 @@ FD.prototype.httpRespond = function(time)
         * cookie, without which we send one to the client redirecting to the
         * same URL.
         */
-       if (appserv_match && this.http_vars_cookies['cookies'] == undefined) {
+       if (appserv_match && this.http_vars_cookies_count == 0) {
                /* Ensure that client supports HTTP cookies */
                doc = new HTTPReply(200, "OK",
                    'text/html; charset=' + options.default_charset);