Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Fix for the previous too quick utf8-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Nov 27, 2009
1 parent e856dae commit d381434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangode.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports.serveFile = function(req, res, filename) {
body = data;
headers = [
['Content-Type', content_type],
['Content-Length', encodeURIComponent(body).replace(/%../g, 'x').length]
['Content-Length', encoding === 'utf8' ? encodeURIComponent(body).replace(/%../g, 'x').length : body.length]
];
sys.puts("static file " + filename + " loaded");
callback();
Expand Down

0 comments on commit d381434

Please sign in to comment.