Use INFILESIZE_LARGE to prevent overflow (Fixes #464)

This commit is contained in:
Gregory Schier 2017-09-09 12:48:27 +00:00
parent 6593b65523
commit 6ee8576d6b
4 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ Curl.option = {
HTTPGET: 'HTTPGET',
HTTPHEADER: 'HTTPHEADER',
HTTPPOST: 'HTTPPOST',
INFILESIZE: 'INFILESIZE',
INFILESIZE_LARGE: 'INFILESIZE_LARGE',
KEYPASSWD: 'KEYPASSWD',
MAXREDIRS: 'MAXREDIRS',
NETRC: 'NETRC',

View File

@ -265,7 +265,7 @@ describe('actuallySend()', () => {
'Transfer-Encoding: '
],
NOPROGRESS: false,
INFILESIZE: 13,
INFILESIZE_LARGE: 13,
PROXY: '',
TIMEOUT_MS: 0,
UPLOAD: 1,

View File

@ -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);

View File

@ -12,7 +12,7 @@ declare class Curl {
HTTPGET: number,
HTTPHEADER: number,
HTTPPOST: number,
INFILESIZE: number,
INFILESIZE_LARGE: number,
KEYPASSWD: number,
MAXREDIRS: number,
NETRC: number,