Permalink
Browse files

Add fix for umlaut problem

  • Loading branch information...
1 parent 243da32 commit 3813e724370f6775c54b69925a16b744533ea616 @pfleidi committed May 10, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/wwwdude/node-versions/v0.2.x.js
  2. +1 −1 lib/wwwdude/node-versions/v0.4.x.js
@@ -32,7 +32,7 @@ exports.request = function (context) {
if (!headers['Content-Type']) {
headers['Content-Type'] = 'application/x-www-form-urlencoded';
}
- headers['Content-Length'] = payload.length;
+ headers['Content-Length'] = Buffer.byteLength(payload);
request = client.request(context.method, url.path, headers);
request.write(payload, context.encoding);
} else {
@@ -37,7 +37,7 @@ exports.request = function (context) {
if (!headers['Content-Type']) {
headers['Content-Type'] = 'application/x-www-form-urlencoded';
}
- headers['Content-Length'] = payload.length;
+ headers['Content-Length'] = Buffer.byteLength(payload);
}
if (url.protocol === 'https:') {

0 comments on commit 3813e72

Please sign in to comment.