Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix curl error "argument list too long" #396

Open
HLFH opened this issue May 2, 2019 · 1 comment
Open

[macOS] Fix curl error "argument list too long" #396

HLFH opened this issue May 2, 2019 · 1 comment

Comments

@HLFH
Copy link

HLFH commented May 2, 2019

Hi,

The WebClient.cls operates badly for curl.

When the request body is too large, the PostJson and Execute methods are triggering the error:

ERROR - WebClient.Execute: -2147210493 (11011 / 80042b03), An error occurred during execute
-2147210494 (80042b02): An unknown cURL error occured, #127
Find details at http://curl.haxx.se/libcurl/c/libcurl-errors.html

Error #127 means the curl command has failed. The Terminal will display the following error:

Argument list too long

There is a maximum length of arguments for a new process.

I am running VBA-Web on macOS 10.14.4.

hlfh$ getconf ARG_MAX
262144

The maximum length of arguments for the curl process on the current macOS is 262144 bytes which is 0.262 megabyte and the length of my curl -d argument was 0.544 megabyte.

Therefore, I will submit a PR to this repo to fix the WebClient.cls file on his function PrepareCurlRequest.

Thanks.

@HLFH HLFH changed the title An unknown cURL error occured [OS X] Fix curl error "argument list too long" May 4, 2019
@HLFH HLFH changed the title [OS X] Fix curl error "argument list too long" [macOS] Fix curl error "argument list too long" May 4, 2019
HLFH added a commit to HLFH/VBA-Web that referenced this issue May 4, 2019
See VBA-tools#396 for details.
The `requestbody.txt` file is being saved to `/Users/MYSUSER/Library/Containers/com.microsoft.Excel/Data` and will be removed once the `curl` command has been executed.
@HLFH
Copy link
Author

HLFH commented May 4, 2019

Done on #397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant