Skip to content

Commit

Permalink
JSlibs built and minimal web server running
Browse files Browse the repository at this point in the history
  • Loading branch information
mvalente committed Dec 2, 2008
2 parents 6690a94 + 76d4bf8 commit 01b60cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion miniWebServer.js
Expand Up @@ -226,6 +226,10 @@ function ProcessRequest( status, headers, output, close ) {
if ( !file.exist || file.info.type != File.FILE_FILE ) {

var message = 'file not found '+root+NormalizePath(status.path);
var file = new File( root + NormalizePath(status.path) );
if ( !file.exist || file.info.type != File.FILE_FILE ) {

var message = 'file not found';
output(CreateHttpHeaders( 404, {'Content-Length':message.length, 'Content-Type':'text/plain'} ));
output(message);
return Noop;
Expand Down Expand Up @@ -262,6 +266,7 @@ function ProcessRequest( status, headers, output, close ) {
var ContentEncoding = Identity;

/*
if ( headers.acceptencoding && headers.acceptencoding.indexOf('deflate') != -1 ) {
respondeHeaders['Content-Encoding'] = 'deflate';
Expand Down Expand Up @@ -445,4 +450,3 @@ try {
throw(ex);
}


0 comments on commit 01b60cc

Please sign in to comment.