From f82f952d2f941f756ce95e970c139e051daa8a8d Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Sun, 29 Oct 2017 13:57:16 +0100 Subject: 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 --- docs/cmdline-opts/form.d | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/cmdline-opts') diff --git a/docs/cmdline-opts/form.d b/docs/cmdline-opts/form.d index b3251bdb8..d95d0cc38 100644 --- a/docs/cmdline-opts/form.d +++ b/docs/cmdline-opts/form.d @@ -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 -- cgit v1.2.3