From: Matthew Mondor Date: Wed, 17 Jan 2007 16:43:47 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: pgsql-branch-merge~18 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=38ea7953ae2e65712752b5683cf94d7b3b8eee95;p=mmondor.git *** empty log message *** --- diff --git a/mmsoftware/js/js-sh/app/httpd/httpd.js b/mmsoftware/js/js-sh/app/httpd/httpd.js index a294543..343135a 100644 --- a/mmsoftware/js/js-sh/app/httpd/httpd.js +++ b/mmsoftware/js/js-sh/app/httpd/httpd.js @@ -1,4 +1,4 @@ -/* $Id: httpd.js,v 1.49 2007/01/07 11:27:54 mmondor Exp $ */ +/* $Id: httpd.js,v 1.50 2007/01/17 16:43:47 mmondor Exp $ */ /* * Copyright (c) 2005-2006, Matthew Mondor @@ -82,7 +82,7 @@ * Server identification */ const SERVER_VERSION = 'mmondor_js_httpd/0.2.1 (NetBSD)'; -const SERVER_CVSID = '$Id: httpd.js,v 1.49 2007/01/07 11:27:54 mmondor Exp $'; +const SERVER_CVSID = '$Id: httpd.js,v 1.50 2007/01/17 16:43:47 mmondor Exp $'; @@ -317,7 +317,8 @@ VHost.prototype = { } if (s == undefined) - stderr.write("No more free appserv slots\n"); + Syslog.log(Syslog.LOG_NOTICE, + "* No more free appserv slots"); return s; }, @@ -677,8 +678,8 @@ function state_http_query_get(time) if (data == null) { /* Error */ if (this.berror != this.BEAGAIN) { - /* XXX */ stderr.write(this.berrorStr[this.berror] - + "\n"); + /* XXX */ Syslog.log(Syslog.LOG_NOTICE, + '* ' + this.berrorStr[this.berror]); if (this.berror == this.BTOOLONG) http_error(this, 413, 'Request Entity Too Large', @@ -706,8 +707,8 @@ function state_http_post_get(time) len = this.http_content_length - this.post_data.length; if ((data = this.bread(len, false)) == null) { if (this.berror != this.BEAGAIN) { - /* XXX */ stderr.write( - this.berrorStr[this.berror] + "\n"); + /* XXX */ Syslog.log(Syslog.LOG_NOTICE, + '* ' + this.berrorStr[this.berror]); return PSTAT_CLOSE_ERROR; } } @@ -1294,8 +1295,8 @@ FD.prototype.httpRespond = function(time) try { fd.lseek(from, FD.SEEK_SET); } catch(x) { - stderr.write(x + - " at lseek()\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + ' at lseek()'); } } } @@ -1377,7 +1378,8 @@ FD.prototype.appserv_connect = function(sid, set) pollset.add(fd); } catch (x) { - stderr.write(x + " in appserv_connect()\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + ' in appserv_connect()'); return false; } @@ -1773,22 +1775,25 @@ function main() { try { var v = new VHost(vhosts[i]); } catch (x) { - stderr.write(x + " creating VHost object\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + ' creating VHost object'); } } /* * Attempt to link default_vhost to a VHost object */ if (options.default_vhost == undefined) { - stderr.write("No default_vhost property in options, exiting\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* No default_vhost property in options, exiting'); exit(); } if (vhosts_table[options.default_vhost.toLowerCase()] != undefined) default_vhost = vhosts_table[options.default_vhost.toLowerCase()]; else { - stderr.write('Default vhost ' + options.default_vhost + - " unkonwn, exiting\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* Default vhost ' + options.default_vhost + + ' unknown, exiting'); exit(); } @@ -1804,8 +1809,9 @@ function main() { for (i2 in mimetypes[i]) { ext = mimetypes[i][i2].toLowerCase(); if (mimetypes_table[ext] != undefined) { - stderr.write('Conflicting mime type ' + - ext + ' -> ' + i + "\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* Conflicting mime type ' + ext + + ' -> ' + i); continue; } mimetypes_table[ext] = i; @@ -1856,7 +1862,8 @@ function main() { fd.type = STYPE_LISTEN; pollset.add(fd); } catch (x) { - stderr.write(x + " preparing listening socket\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + ' preparing listening socket'); } } if (pollset.count == 0) @@ -1913,7 +1920,8 @@ function main() { try { e = FD.poll(pollset.set, exp * 1000); } catch (x) { - stderr.write(x + " for poll(2)\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + ' for poll(2)'); continue; } @@ -2020,8 +2028,9 @@ function main() { fd.state_http_init(cur); pollset.add(fd); } catch (x) { - stderr.write(x + - " at accept(2)\n"); + Syslog.log(Syslog.LOG_NOTICE, + '* ' + x + + ' at accept(2)'); fd.close(); } }