Permalink
Browse files

Merge pull request #155 from kevinpeterson/master

Only add "Content-Length" header on POST/PUT calls.
  • Loading branch information...
mansilladev committed Mar 20, 2014
2 parents be69ced + 3ad32d5 commit 9264e8f7f775bcbb8c54d127a59f894b0b1673e6
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.js
View
2 app.js
@@ -821,7 +821,7 @@ function processRequest(req, res, next) {
if(options.headers === void 0){
options.headers = {}
}
- if (!options.headers['Content-Length']) {
+ if (['POST','PUT'].indexOf(httpMethod) !== -1 && !options.headers['Content-Length']) {
if (requestBody) {
options.headers['Content-Length'] = requestBody.length;
}

0 comments on commit 9264e8f

Please sign in to comment.