Add back default Accept header (Fixes #581)

This commit is contained in:
Gregory Schier committed 2017-11-09 20:26:08 +01:00
1 parent 42631bebdf
commit 7490c7282d
2 files changed
+11 -11

No files matched your search

+10 -10
View File
@@ -79,7 +79,7 @@ describe('actuallySend()', () => {
'Content-Type: application/json',
'Expect: ',
'Transfer-Encoding: ',
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
NOPROGRESS: false,
@@ -134,7 +134,7 @@ describe('actuallySend()', () => {
'Content-Type: application/x-www-form-urlencoded',
'Expect: ',
'Transfer-Encoding: ',
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
NOPROGRESS: false,
@@ -214,7 +214,7 @@ describe('actuallySend()', () => {
'Content-Type: application/json',
'Expect: ',
'Transfer-Encoding: ',
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
NOPROGRESS: false,
@@ -266,7 +266,7 @@ describe('actuallySend()', () => {
'Content-Type: application/octet-stream',
'Expect: ',
'Transfer-Encoding: ',
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
NOPROGRESS: false,
@@ -325,7 +325,7 @@ describe('actuallySend()', () => {
'Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY',
'Expect: ',
'Transfer-Encoding: ',
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
INFILESIZE_LARGE: 244,
@@ -375,7 +375,7 @@ describe('actuallySend()', () => {
COOKIEFILE: '',
FOLLOWLOCATION: true,
HTTPHEADER: [
'Accept: ',
'Accept: */*',
'Accept-Encoding: ',
'content-type: '
],
@@ -413,7 +413,7 @@ describe('actuallySend()', () => {
COOKIEFILE: '',
FOLLOWLOCATION: true,
HTTPHEADER: [
'Accept: ',
'Accept: */*',
'Accept-Encoding: ',
'content-type: '
],
@@ -450,7 +450,7 @@ describe('actuallySend()', () => {
COOKIEFILE: '',
FOLLOWLOCATION: true,
HTTPHEADER: [
'Accept: ',
'Accept: */*',
'Accept-Encoding: ',
'content-type: '
],
@@ -488,7 +488,7 @@ describe('actuallySend()', () => {
COOKIEFILE: '',
FOLLOWLOCATION: true,
HTTPHEADER: [
'Accept: ',
'Accept: */*',
'Accept-Encoding: ',
'content-type: '
],
@@ -543,7 +543,7 @@ describe('_getAwsAuthHeaders', () => {
secretAccessKey: 'SAK9999999999999'
},
headers: [
'Accept: ',
'Accept: */*',
'Accept-Encoding: '
],
url: 'https://example.com',
+1 -1
View File
@@ -456,7 +456,7 @@ export function _actuallySend (
}
// Setup encoding settings
headers.push({name: 'Accept', value: ''}); // Don't auto-send this header
headers.push({name: 'Accept', value: '*/*'}); // Default to anything
headers.push({name: 'Accept-Encoding', value: ''}); // Don't auto-send this header
setOpt(Curl.option.ACCEPT_ENCODING, ''); // Auto decode everything