mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Set max redirects limit to 20 (Closes #414)
This commit is contained in:
parent
b88f4741e4
commit
a834b93e5e
@ -99,6 +99,7 @@ Curl.option = {
|
||||
HTTPPOST: 'HTTPPOST',
|
||||
INFILESIZE: 'INFILESIZE',
|
||||
KEYPASSWD: 'KEYPASSWD',
|
||||
MAXREDIRS: 'MAXREDIRS',
|
||||
NETRC: 'NETRC',
|
||||
NOBODY: 'NOBODY',
|
||||
NOPROGRESS: 'NOPROGRESS',
|
||||
|
@ -71,6 +71,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: [
|
||||
'Content-Type: application/json',
|
||||
'Expect: ',
|
||||
@ -123,6 +124,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: [
|
||||
'Content-Type: application/x-www-form-urlencoded',
|
||||
'Expect: ',
|
||||
@ -200,6 +202,7 @@ describe('actuallySend()', () => {
|
||||
CUSTOMREQUEST: 'GET',
|
||||
ACCEPT_ENCODING: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: [
|
||||
'Content-Type: application/json',
|
||||
'Expect: ',
|
||||
@ -255,6 +258,7 @@ describe('actuallySend()', () => {
|
||||
CUSTOMREQUEST: 'POST',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: [
|
||||
'Content-Type: application/octet-stream',
|
||||
'Expect: ',
|
||||
@ -310,6 +314,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: [
|
||||
'Content-Type: multipart/form-data',
|
||||
'Expect: ',
|
||||
@ -350,6 +355,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: ['content-type: '],
|
||||
NOPROGRESS: false,
|
||||
PROXY: '',
|
||||
@ -383,6 +389,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: ['content-type: '],
|
||||
NOPROGRESS: false,
|
||||
PROXY: '',
|
||||
@ -415,6 +422,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: ['content-type: '],
|
||||
NOPROGRESS: false,
|
||||
PROXY: '',
|
||||
@ -448,6 +456,7 @@ describe('actuallySend()', () => {
|
||||
ACCEPT_ENCODING: '',
|
||||
COOKIEFILE: '',
|
||||
FOLLOWLOCATION: true,
|
||||
MAXREDIRS: 20,
|
||||
HTTPHEADER: ['content-type: '],
|
||||
NOPROGRESS: false,
|
||||
PROXY: '',
|
||||
|
@ -132,6 +132,7 @@ export function _actuallySend (
|
||||
|
||||
// Set all the basic options
|
||||
setOpt(Curl.option.FOLLOWLOCATION, settings.followRedirects);
|
||||
setOpt(Curl.option.MAXREDIRS, 20);
|
||||
setOpt(Curl.option.TIMEOUT_MS, settings.timeout); // 0 for no timeout
|
||||
setOpt(Curl.option.VERBOSE, true); // True so debug function works
|
||||
setOpt(Curl.option.NOPROGRESS, false); // False so progress function works
|
||||
|
1
flow-typed/node-libcurl.js
vendored
1
flow-typed/node-libcurl.js
vendored
@ -14,6 +14,7 @@ declare class Curl {
|
||||
HTTPPOST: number,
|
||||
INFILESIZE: number,
|
||||
KEYPASSWD: number,
|
||||
MAXREDIRS: number,
|
||||
NETRC: number,
|
||||
NOBODY: number,
|
||||
NOPROGRESS: number,
|
||||
|
Loading…
Reference in New Issue
Block a user