http: don't default OPTIONS to chunked encoding

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Fedor Indutny <fedor@indutny.com>
pull/41362/head
Nick Muerdter 2014-06-03 21:49:38 -06:00 committed by Trevor Norris
parent bd988a590a
commit 1df32af74a
2 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,7 @@ function ClientRequest(options, cb) {
if (method === 'GET' ||
method === 'HEAD' ||
method === 'DELETE' ||
method === 'OPTIONS' ||
method === 'CONNECT') {
self.useChunkedEncodingByDefault = false;
} else {

View File

@ -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']
};