mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Use INFILESIZE_LARGE to prevent overflow (Fixes #464)
This commit is contained in:
parent
6593b65523
commit
6ee8576d6b
@ -97,7 +97,7 @@ Curl.option = {
|
||||
HTTPGET: 'HTTPGET',
|
||||
HTTPHEADER: 'HTTPHEADER',
|
||||
HTTPPOST: 'HTTPPOST',
|
||||
INFILESIZE: 'INFILESIZE',
|
||||
INFILESIZE_LARGE: 'INFILESIZE_LARGE',
|
||||
KEYPASSWD: 'KEYPASSWD',
|
||||
MAXREDIRS: 'MAXREDIRS',
|
||||
NETRC: 'NETRC',
|
||||
|
@ -265,7 +265,7 @@ describe('actuallySend()', () => {
|
||||
'Transfer-Encoding: '
|
||||
],
|
||||
NOPROGRESS: false,
|
||||
INFILESIZE: 13,
|
||||
INFILESIZE_LARGE: 13,
|
||||
PROXY: '',
|
||||
TIMEOUT_MS: 0,
|
||||
UPLOAD: 1,
|
||||
|
@ -400,7 +400,7 @@ export function _actuallySend (
|
||||
const fileName = renderedRequest.body.fileName || '';
|
||||
const fd = fs.openSync(fileName, 'r+');
|
||||
|
||||
setOpt(Curl.option.INFILESIZE, size);
|
||||
setOpt(Curl.option.INFILESIZE_LARGE, size);
|
||||
setOpt(Curl.option.UPLOAD, 1);
|
||||
setOpt(Curl.option.READDATA, fd);
|
||||
|
||||
|
2
flow-typed/insomnia-node-libcurl.js
vendored
2
flow-typed/insomnia-node-libcurl.js
vendored
@ -12,7 +12,7 @@ declare class Curl {
|
||||
HTTPGET: number,
|
||||
HTTPHEADER: number,
|
||||
HTTPPOST: number,
|
||||
INFILESIZE: number,
|
||||
INFILESIZE_LARGE: number,
|
||||
KEYPASSWD: number,
|
||||
MAXREDIRS: number,
|
||||
NETRC: number,
|
||||
|
Loading…
Reference in New Issue
Block a user