-/* $Id: httpd.js,v 1.26 2005/07/07 18:30:48 mmondor Exp $ */
+/* $Id: httpd.js,v 1.27 2005/07/07 20:36:26 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.26 2005/07/07 18:30:48 mmondor Exp $';
+SERVER_CVSID = '$Id: httpd.js,v 1.27 2005/07/07 20:36:26 mmondor Exp $';
var i;
for (i in sessions_table) {
- if (sessions_table[i].expires >= time)
+ if (sessions_table[i].expires <= time)
delete sessions_table[i];
}
}
*/
if ((sessid = this.http_vars_cookies['SessionID']) != undefined &&
(sess = sessions_table[sessid]) != undefined &&
- sess.expires < time) {
+ sess.expires > time) {
this.http_sessid = sessid;
this.http_vars_session = sess.variables;
}
* Verify if we should call the session gc, and if so, do so.
*/
sess_gc_secs += cur - old;
- if (sess_gc_secs >= options.sess_gc_timeout) {
+ if (sess_gc_secs >= options.sess_gc_interval) {
sess_gc_secs = 0;
session_gc(cur);
}
-/* $Id: options.js,v 1.6 2005/07/07 17:09:54 mmondor Exp $ */
+/* $Id: options.js,v 1.7 2005/07/07 20:36:26 mmondor Exp $ */
var options = {
/* Maximum number of concurrent clients that we should serve */
default_mimetype: "application/octet-stream",
default_charset: "us-ascii",
default_session_exp: 1800,
- sess_gc_timeout: 600
+ sess_gc_interval: 600
};
/* Address:port combinations to listen to */