Skip to content

Commit

Permalink
http: don't default OPTIONS to chunked encoding
Browse files Browse the repository at this point in the history
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
GUI authored and trevnorris committed Jun 5, 2014
1 parent bd988a5 commit 1df32af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/_http_client.js
Expand Up @@ -119,6 +119,7 @@ function ClientRequest(options, cb) {
if (method === 'GET' ||
method === 'HEAD' ||
method === 'DELETE' ||
method === 'OPTIONS' ||
method === 'CONNECT') {
self.useChunkedEncodingByDefault = false;
} else {
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-http-client-default-headers-exist.js
Expand Up @@ -27,6 +27,7 @@ var expectedHeaders = {
'DELETE': ['host', 'connection'],
'GET': ['host', 'connection'],
'HEAD': ['host', 'connection'],
'OPTIONS': ['host', 'connection'],
'POST': ['host', 'connection', 'transfer-encoding'],
'PUT': ['host', 'connection', 'transfer-encoding']
};
Expand Down

0 comments on commit 1df32af

Please sign in to comment.