Skip to content

Commit

Permalink
Merge pull request #8 from orls/master
Browse files Browse the repository at this point in the history
Fix some header issues
  • Loading branch information
steelThread committed Jun 15, 2011
2 parents 3b63ca2 + 4fe8c6d commit b504684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connect-jsonp.js
Expand Up @@ -94,8 +94,8 @@ module.exports = function jsonp(config) {
res.end = function(data, encoding) {
if (data) body += data;
body = context.callback + '(' + body + ')';
res.setHeader('Content-Type', APP_JS_CONTENT_TYPE);
res.setHeader('Content-Length', body.length);
headers['Content-Type'] = APP_JS_CONTENT_TYPE;
headers['Content-Length'] = Buffer.byteLength(body, encoding || "utf8");
previous(code, headers, res, context, body, encoding);
};

Expand Down

0 comments on commit b504684

Please sign in to comment.