Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from cpsubrian/safari

Fixes safari caching problem.
  • Loading branch information...
commit f01e25f3da243b8637243aceb0fef26589deabf4 2 parents 3b6e3ed + fee0ece
@carlos8f authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/file.js
View
4 lib/file.js
@@ -96,6 +96,10 @@ File.prototype.serve = function(req, res, status) {
if (req.method === 'HEAD') {
body = null;
}
+ if (!body) {
+ delete(headers['Content-Encoding']);
+ delete(headers['Content-Length']);
+ }
if (this.keepAlive && ((res.response && res.response.shouldKeepAlive) || res.shouldKeepAlive)) {
headers['Keep-Alive'] = 'timeout=' + this.keepAlive;
Please sign in to comment.
Something went wrong with that request. Please try again.