Skip to content
Permalink
Browse files

JSlibs built and minimal web server running

  • Loading branch information
mvalente committed Dec 2, 2008
2 parents 6690a94 + 76d4bf8 commit 01b60cc6ddea10e93130508e591b821674078454
Showing with 5 additions and 1 deletion.
  1. +5 −1 miniWebServer.js
@@ -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;
@@ -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';
@@ -445,4 +450,3 @@ try {
throw(ex);
}


0 comments on commit 01b60cc

Please sign in to comment.