diff --git a/app/network/__tests__/network.test.js b/app/network/__tests__/network.test.js index 6325a264e5..bacc36823f 100644 --- a/app/network/__tests__/network.test.js +++ b/app/network/__tests__/network.test.js @@ -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', diff --git a/app/network/network.js b/app/network/network.js index 8c40e514c5..0df3f42b99 100644 --- a/app/network/network.js +++ b/app/network/network.js @@ -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