mirror of https://github.com/nodejs/node.git
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/5010/head
parent
bd988a590a
commit
1df32af74a
|
@ -119,6 +119,7 @@ function ClientRequest(options, cb) {
|
|||
if (method === 'GET' ||
|
||||
method === 'HEAD' ||
|
||||
method === 'DELETE' ||
|
||||
method === 'OPTIONS' ||
|
||||
method === 'CONNECT') {
|
||||
self.useChunkedEncodingByDefault = false;
|
||||
} else {
|
||||
|
|
|
@ -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']
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue