Skip to content
Browse files

document the double-quote and backslash need be escaped if quoting.

  • Loading branch information...
1 parent fcca552 commit 81ea8277ef3c9b5333e82873f0e457ff3b17a252 @ulion committed Jan 20, 2013
Showing with 5 additions and 1 deletion.
  1. +3 −0 docs/curl.1
  2. +2 −1 src/tool_formparse.c
View
3 docs/curl.1
@@ -492,6 +492,9 @@ or
\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
+Note that if a filename/path is quoted by double-quotes, any double-quote
+or backslash within the filename must be escaped by backslash.
+
See further examples and details in the MANUAL.
This option can be used multiple times.
View
3 src/tool_formparse.c
@@ -133,7 +133,8 @@ char *get_param_word(char **str, char **end_pos)
* 'name=@filename;filename="play, play, and play.txt"'
*
* If filename/path contains ',' or ';', it must be quoted by double-quotes,
- * else curl will fail to figure out the correct filename.
+ * else curl will fail to figure out the correct filename. if the filename
+ * tobe quoted contains '"' or '\', '"' and '\' must be escaped by backslash.
*
* This function uses curl_formadd to fulfill it's job. Is heavily based on
* the old curl_formparse code.

0 comments on commit 81ea827

Please sign in to comment.
Something went wrong with that request. Please try again.