cli tool: in -F option arg, comma is a delimiter for files only

Also upgrade test 1133 to cover this case and clarify man page about
form data quoting.

Bug: https://github.com/curl/curl/issues/2022
Reported-By: omau on github
This commit is contained in:
Patrick Monnerat 2017-10-29 13:57:16 +01:00 committed by monnerat
parent 7ee59512f8
commit f82f952d2f
3 changed files with 34 additions and 20 deletions

View file

@ -57,6 +57,11 @@ or
Note that if a filename/path is quoted by double-quotes, any double-quote
or backslash within the filename must be escaped by backslash.
Quoting must also be applied to non-file data if it contains semicolons,
leading/trailing spaces or leading double quotes:
curl -F 'colors="red; green; blue";type=text/x-myapp' example.com
You can add custom headers to the field by setting headers=, like
curl -F "submit=OK;headers=\\"X-submit-type: OK\\"" example.com