Skip to content
Browse files

tidy

  • Loading branch information...
1 parent a40ee2a commit bf1b12070a32debb4357a94e91328a2f46af4502 Jeremy Bornstein committed Jan 29, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 bastard.js
View
16 bastard.js
@@ -624,7 +624,7 @@ function Bastard (config) {
if (statComplete && fingerprintComplete) prerequisitesComplete ();
});
} else {
- console.info ("Not gzipping an image");
+ if (debug) console.info ("Not gzipping an image");
dataComplete = true;
if (statComplete && fingerprintComplete) prerequisitesComplete ();
}
@@ -650,7 +650,7 @@ function Bastard (config) {
'Content-Type': contentType,
'Vary': 'Accept-Encoding',
'Cache-Control': "max-age=" + maxAgeInSeconds,
- 'Server': 'bastard/0.6.2'
+ 'Server': 'bastard/0.6.3'
};
if (encoding) responseHeaders['Content-Encoding'] = encoding;
if (modificationTime) responseHeaders['Last-Modified'] = modificationTime;
@@ -760,7 +760,7 @@ function Bastard (config) {
if (errorHandler) {
errorHandler (response, errorCode, errorMessage);
} else {
- response.writeHead (errorCode, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.2'});
+ response.writeHead (errorCode, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.3'});
response.end (errorMessage, 'utf8');
}
return;
@@ -773,15 +773,15 @@ function Bastard (config) {
if (errorHandler) {
errorHandler (response, 404, errorMessage);
} else {
- response.writeHead (404, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.2'});
+ response.writeHead (404, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.3'});
response.end (errorMessage, 'utf8');
}
return;
}
var modificationTime = cacheRecordParam.modified;
if (ifModifiedSince && modificationTime && modificationTime <= ifModifiedSince) {
- response.writeHead (304, {'Server': 'bastard/0.6.2'});
+ response.writeHead (304, {'Server': 'bastard/0.6.3'});
response.end ();
} else {
if (headOnly) {
@@ -792,7 +792,7 @@ function Bastard (config) {
if (errorHandler) {
errorHandler (response, 404, errorMessage);
} else {
- response.writeHead (404, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.2'});
+ response.writeHead (404, {'Content-Type': 'text/plain; charset=utf-8', 'Server': 'bastard/0.6.3'});
response.end (errorMessage, 'utf8');
}
} else {
@@ -832,7 +832,7 @@ function Bastard (config) {
}
function serveFromCacheRecord (cacheRecordParam) {
- response.writeHead (200, {'Content-Type': 'text/plain', 'Server': 'bastard/0.6.2'});
+ response.writeHead (200, {'Content-Type': 'text/plain', 'Server': 'bastard/0.6.3'});
response.end (errorMessage, 'utf8');
}
@@ -855,7 +855,7 @@ function Bastard (config) {
function displayCache (response) {
- response.writeHead (404, {'Content-Type': 'text/html; charset=utf-8', 'Server': 'bastard/0.6.2'});
+ response.writeHead (404, {'Content-Type': 'text/html; charset=utf-8', 'Server': 'bastard/0.6.3'});
response.write ('<html><body>', 'utf8');
for (var cacheKey in cacheData) {
response.write ('<h1>' + cacheKey + '</h1>', 'utf8');

0 comments on commit bf1b120

Please sign in to comment.
Something went wrong with that request. Please try again.