Skip to content

Commit

Permalink
document the double-quote and backslash need be escaped if quoting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulion committed Jan 20, 2013
1 parent fcca552 commit 81ea827
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/curl.1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/tool_formparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 81ea827

Please sign in to comment.