-/* $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
* 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 $';
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;
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 &&
* 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);