-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Cannot use json with several values from command line as multi-part upload #2022
Comments
Feel like taking a look at this @monnerat ? I could verify that it works with my 7.55.1 but not with git master... |
@monnerat It seems get_param_part/get_param_word checks for outer quotes before splitting but there aren't any (since the argument is passed to curl as get_param_part get_param_part calls: get_param_word get_param_part returns: and that is all that is sent. but was it intended to split the field if it's not recognized as opposed to ;type or something
|
@jay: many thanks for the additional info. First, I think this particular case is a very good candidate for the Next, I agree the comma should'nt be a delimiter except when value starts with Please note there are minor differences from 7.55. Maybe they should be documented:
If these differences are acceptable to you, I suggest (and intend) to simply remove comma as a delimiter except for |
Also upgrade test 1133 to cover this case and clarify man page about form data quoting. Bug: #2022 Reported-By: omau on github
Fixed by f82f952 Closing this issue |
I did this
curl -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" url
I expected the following
curl: (6) Could not resolve host: url
Instead I received:
Warning: garbage at end of field specification: ,"field2":"value2"}
curl: (6) Could not resolve host: url
(since 7.56.0, still works fine with 7.55.1)
curl/libcurl version
curl 7.56.1 (x86_64-pc-linux-gnu) libcurl/7.56.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.18.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Release-Date: 2017-10-23
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
operating system
Arch Linux
The text was updated successfully, but these errors were encountered: