From: Matthew Mondor Date: Fri, 24 Nov 2006 00:58:45 +0000 (+0000) Subject: Cleanup X-Git-Tag: pgsql-branch-merge~75 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=eddd0f6ca9e9ecf2fc14ba074465cac7dd49df12;p=mmondor.git Cleanup --- diff --git a/mmsoftware/js/js-sh/app/httpd/httpd.js b/mmsoftware/js/js-sh/app/httpd/httpd.js index 5622c5d..23c2225 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.44 2006/11/24 00:53:54 mmondor Exp $ */ +/* $Id: httpd.js,v 1.45 2006/11/24 00:58:45 mmondor Exp $ */ /* * Copyright (c) 2005-2006, Matthew Mondor @@ -76,7 +76,7 @@ * Server identification */ const SERVER_VERSION = 'mmondor_js_httpd/0.2.1 (NetBSD)'; -const SERVER_CVSID = '$Id: httpd.js,v 1.44 2006/11/24 00:53:54 mmondor Exp $'; +const SERVER_CVSID = '$Id: httpd.js,v 1.45 2006/11/24 00:58:45 mmondor Exp $'; @@ -441,15 +441,6 @@ HTTPReply.prototype = { for (i = 0; i < this.contents.length; i++) contents += this.contents[i]; - /* - 70.50.245.131 - - [23/Nov/2006:16:43:40 -0500] ascpi.net "POST - /inscription/admin_recherche_do.php HTTP/1.0" 302 167 "-" - "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) - Gecko/20050511 Firefox/1.0.4" - LogFormat "%h %l %u %t %v \"%r\" %>s %b \"%{Referer}i\" - \"%{User-Agent}i\"" combined - */ - t = new Date(); Syslog.log(Syslog.LOG_NOTICE, fd.client_addr + ' - - ' + http_log_date() + ' ' + fd.http_vhost.name + ' "' + @@ -459,10 +450,9 @@ HTTPReply.prototype = { this.headers.push('Content-Length: ' + (size == null ? contents.length : size)); - /* XXX - stdout.write(' --> ' + this.code + ' ' + - this.headers.toSource() + "\n"); - */ + if (options.debug == true) + stdout.write(' --> ' + this.code + ' ' + + this.headers.toSource() + "\n"); headers += 'HTTP/1.1 ' + this.code + ' ' + this.desc + "\r\n"; for (i = 0; i < this.headers.length; i++) headers += this.headers[i] + "\r\n"; @@ -851,10 +841,9 @@ FD.prototype.parseQuery = function(time) /* Split request lines */ lines = this.query_data; - /* XXX - stdout.write(this.client_addr + ':' + this.client_port + ' ' + - lines.toSource()); - */ + if (options.debug == true) + stdout.write(this.client_addr + ':' + this.client_port + ' ' + + lines.toSource()); /* Verify if first line has a request which seems valid */ if (lines.length > 0) { @@ -1126,33 +1115,6 @@ FD.prototype.httpRespond = function(time) return PSTAT_CLOSE_SUCCESS; } - /* XXX In case of query to a directory done without the - * trailing '/', apache redirects as follows: - * - * "HTTP/1.1 301 Moved Permanently\r - * Date: Wed, 22 Nov 2006 04:01:03 GMT\r - * Server: Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7d\r - * Location: http://mmondor.pulsar-zone.net/img_gallery/\r - * Connection: close\r - * Content-Type: text/html; charset=iso-8859-1\r - * \r - * - * - * 301 Moved Permanently - * - *

Moved Permanently

- * The document has moved here.

- * - * - * This however does not allow the client to know that the - * current URL internally set to an index such as index.html. - * Perhaps e should redirect to the full URL? - * Except for directories without an index for which - * auto-indexing is to be performed, of course. - */ - /* Directory? */ if ((st.st_mode & FD.S_IFDIR) != 0) { var error = false;