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' ||
|
if (method === 'GET' ||
|
||||||
method === 'HEAD' ||
|
method === 'HEAD' ||
|
||||||
method === 'DELETE' ||
|
method === 'DELETE' ||
|
||||||
|
method === 'OPTIONS' ||
|
||||||
method === 'CONNECT') {
|
method === 'CONNECT') {
|
||||||
self.useChunkedEncodingByDefault = false;
|
self.useChunkedEncodingByDefault = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -27,6 +27,7 @@ var expectedHeaders = {
|
||||||
'DELETE': ['host', 'connection'],
|
'DELETE': ['host', 'connection'],
|
||||||
'GET': ['host', 'connection'],
|
'GET': ['host', 'connection'],
|
||||||
'HEAD': ['host', 'connection'],
|
'HEAD': ['host', 'connection'],
|
||||||
|
'OPTIONS': ['host', 'connection'],
|
||||||
'POST': ['host', 'connection', 'transfer-encoding'],
|
'POST': ['host', 'connection', 'transfer-encoding'],
|
||||||
'PUT': ['host', 'connection', 'transfer-encoding']
|
'PUT': ['host', 'connection', 'transfer-encoding']
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue