Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't set content type of not modified action result, as this confuse…

…s webkit browsers.
  • Loading branch information...
commit 0ca1dfc399e138560183792b555b1e1089c61c0f 1 parent 0979d48
Matt Lee authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/josi/actionresults.js
5 lib/josi/actionresults.js
View
@@ -82,8 +82,9 @@ this.ContentResult = ContentResult = ActionResult.extend({
.addListener('data', function(data){
if (first) {
first = false;
+ var contentType = utilities.mime.lookup(utilities.extension(filename));
self.headers.push(['Transfer-Encoding', 'chunked']);
- self.headers.push(['Content-Type', utilities.mime.lookup(utilities.extension(filename))]);
+ self.headers.push(['Content-Type', contentType]);
res.writeHead(200, self.headers);
}
res.write(data, 'binary');
@@ -123,7 +124,7 @@ this.notFound = notFound = function(msg) {
};
this.notModified = notModified = function() {
- return new ActionResult(null, [ ['Content-Type', 'text/html'] ], 304);
+ return new ActionResult(null, [], 304);
};
this.error = error = function(err, httpStatusCode) {
Please sign in to comment.
Something went wrong with that request. Please try again.