diff --git a/lib/request-wrapper.ts b/lib/request-wrapper.ts index a3c9a7485..62b0222c1 100644 --- a/lib/request-wrapper.ts +++ b/lib/request-wrapper.ts @@ -70,7 +70,7 @@ export class RequestWrapper { // to 'application/x-www-form-urlencoded'. This causes problems, so overriding the // defaults here const axiosConfig: AxiosRequestConfig = { - maxContentLength: Infinity, + maxContentLength: -1, maxBodyLength: Infinity, headers: { post: { diff --git a/test/unit/request-wrapper.test.js b/test/unit/request-wrapper.test.js index cdf8e3b6b..15d3e0ff5 100644 --- a/test/unit/request-wrapper.test.js +++ b/test/unit/request-wrapper.test.js @@ -70,7 +70,7 @@ describe('RequestWrapper constructor', () => { // the constructor puts together a config object and creates the // axios instance with it const createdAxiosConfig = axios.default.create.mock.calls[0][0]; - expect(createdAxiosConfig.maxContentLength).toBe(Infinity); + expect(createdAxiosConfig.maxContentLength).toBe(-1); expect(createdAxiosConfig.maxBodyLength).toBe(Infinity); expect(createdAxiosConfig.headers).toBeDefined(); expect(createdAxiosConfig.headers.post).toBeDefined();