aboutsummaryrefslogtreecommitdiff
path: root/src/hugehelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hugehelp.c')
-rw-r--r--src/hugehelp.c73
1 files changed, 44 insertions, 29 deletions
diff --git a/src/hugehelp.c b/src/hugehelp.c
index 4a0fcab8c..c0ceebf6a 100644
--- a/src/hugehelp.c
+++ b/src/hugehelp.c
@@ -110,16 +110,32 @@ puts (
" -d/--data <data>\n"
" (HTTP) Sends the specified data in a POST request to\n"
" the HTTP server. Note that the data is sent exactly as\n"
-" specified with no extra processing. The data is\n"
-" expected to be \"url-encoded\". This will cause curl to\n"
-" pass the data to the server using the content-type\n"
-" application/x-www-form-urlencoded. Compare to -F.\n"
-"\n"
-" If you start the data with the letter @, the rest\n"
-" should be a file name to read the data from, or - if\n"
-" you want curl to read the data from stdin. The con­\n"
+" specified with no extra processing (with all newlines\n"
+" cut off). The data is expected to be \"url-encoded\".\n"
+" This will cause curl to pass the data to the server\n"
+" using the content-type application/x-www-form-urlen­\n"
+" coded. Compare to -F.\n"
+"\n"
+" If you start the data with the letter @, the rest\n"
+" should be a file name to read the data from, or - if\n"
+" you want curl to read the data from stdin. The con­\n"
" tents of the file must already be url-encoded.\n"
"\n"
+" To post data purely binary, you should instead use the\n"
+" --data-binary option.\n"
+"\n"
+" -d/--data is the same as --data-ascii.\n"
+"\n"
+" --data-ascii <data>\n"
+" (HTTP) This is an alias for the -d/--data option.\n"
+"\n"
+" --data-binary <data>\n"
+" (HTTP) This posts data in a similar manner as --data-\n"
+" ascii does, although when using this option the entire\n"
+" context of the posted data is kept as-is. If you want\n"
+" to post a binary file without the strip-newlines fea­\n"
+" ture of the --data-ascii option, this is for you.\n"
+"\n"
" -D/--dump-header <file>\n"
" (HTTP/FTP) Write the HTTP headers to this file. Write\n"
" the FTP file info to this file if -I/--head is used.\n"
@@ -198,7 +214,6 @@ puts (
" (HTTP) Include the HTTP-header in the output. The HTTP-\n"
" header includes things like server-name, date of the\n"
" document, HTTP-version and more...\n"
-"\n"
" -I/--head\n"
" (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers\n"
" feature the command HEAD which this uses to get nothing\n"
@@ -211,10 +226,13 @@ puts (
" arguments can be written which then will be used as if\n"
" they were written on the actual command line. If the\n"
" first column of a config line is a '#' character, the\n"
+);
+ puts(
" rest of the line will be treated as a comment.\n"
"\n"
" Specify the filename as '-' to make curl read the file\n"
" from stdin.\n"
+"\n"
" -l/--list-only\n"
" (FTP) When listing an FTP directory, this switch forces\n"
" a name-only view. Especially useful if you want to\n"
@@ -226,8 +244,6 @@ puts (
" (HTTP/HTTPS) If the server reports that the requested\n"
" page has a different location (indicated with the\n"
" header line Location:) this flag will let curl attempt\n"
-);
- puts(
" to reattempt the get on the new place. If used together\n"
" with -i or -I, headers from all requested pages will be\n"
" shown. If this flag is used when making a HTTP POST,\n"
@@ -304,7 +320,6 @@ puts (
"\n"
" - (any single-letter string) to make it pick\n"
" the machine's default\n"
-"\n"
" -q If used as the first parameter on the command line, the\n"
" $HOME/.curlrc file will not be read and used as a con­\n"
" fig file.\n"
@@ -320,6 +335,7 @@ puts (
" to be run before and after the transfer. If the server\n"
" returns failure for one of the commands, the entire\n"
" operation will be aborted.\n"
+"\n"
" -r/--range <range>\n"
" (HTTP/FTP) Retrieve a byte range (i.e a partial docu­\n"
" ment) from a HTTP/1.1 or FTP server. Ranges can be\n"
@@ -356,7 +372,6 @@ puts (
" -s/--silent\n"
" Silent mode. Don't show progress meter or error mes­\n"
" sages. Makes Curl mute.\n"
-"\n"
" -S/--show-error\n"
" When used with -s it makes curl show error message if\n"
" it fails.\n"
@@ -408,9 +423,9 @@ puts (
" particular file you specify it \"@filename\" and to tell\n"
" curl to read the format from stdin you write \"@-\".\n"
"\n"
-" The variables present in the output format will be sub­\n"
-" stituted by the value or text that curl thinks fit, as\n"
-" described below. All variables are specified like\n"
+" The variables present in the output format will be\n"
+" substituted by the value or text that curl thinks fit,\n"
+" as described below. All variables are specified like\n"
" %{variable_name} and to output a normal % you just\n"
" write them like %%. You can output a newline by using\n"
" \\n, a carrige return with \\r and a tab space with \\t.\n"
@@ -424,6 +439,7 @@ puts (
" url_effective The URL that was fetched last. This is\n"
" mostly meaningful if you've told curl to\n"
" follow location: headers.\n"
+"\n"
" http_code The numerical code that was found in the\n"
" last retrieved HTTP(S) page.\n"
"\n"
@@ -447,6 +463,8 @@ puts (
" transfer commands and negotiations that\n"
" are specific to the particular proto­\n"
" col(s) involved.\n"
+);
+ puts(
"\n"
" size_download The total amount of bytes that were\n"
" downloaded.\n"
@@ -459,15 +477,12 @@ puts (
"\n"
" speed_upload The average upload speed that curl mea­\n"
" sured for the complete download.\n"
-"\n"
" -x/--proxy <proxyhost[:port]>\n"
" Use specified proxy. If the port number is not speci­\n"
" fied, it is assumed at port 1080.\n"
"\n"
" -X/--request <command>\n"
" (HTTP) Specifies a custom request to use when communi­\n"
-);
- puts(
" cating with the HTTP server. The specified request\n"
" will be used instead of the standard GET. Read the HTTP\n"
" 1.1 specification for details and explanations.\n"
@@ -529,6 +544,7 @@ puts (
"ENVIRONMENT\n"
" HTTP_PROXY [protocol://]<host>[:port]\n"
" Sets proxy server to use for HTTP.\n"
+"\n"
" HTTPS_PROXY [protocol://]<host>[:port]\n"
" Sets proxy server to use for HTTPS.\n"
"\n"
@@ -564,7 +580,6 @@ puts (
"\n"
" 4 URL user malformatted. The user-part of the URL syntax\n"
" was not correct.\n"
-"\n"
" 5 Couldn't resolve proxy. The given proxy host could not\n"
" be resolved.\n"
"\n"
@@ -580,6 +595,7 @@ puts (
"\n"
" 10 FTP user/password incorrect. Either one or both were\n"
" not accepted by the server.\n"
+"\n"
" 11 FTP weird PASS reply. Curl couldn't parse the reply\n"
" sent to the PASS request.\n"
"\n"
@@ -616,7 +632,6 @@ puts (
"\n"
" 23 Write error. Curl couldn't write data to a local\n"
" filesystem or similar.\n"
-"\n"
" 24 Malformat user. User name badly specified.\n"
"\n"
" 25 FTP couldn't STOR file. The server denied the STOR\n"
@@ -631,6 +646,7 @@ puts (
"\n"
" 29 FTP couldn't set ASCII. The server returned an unknown\n"
" reply.\n"
+"\n"
" 30 FTP PORT failed. The PORT command failed.\n"
"\n"
" 31 FTP couldn't use REST. The REST command failed.\n"
@@ -667,7 +683,6 @@ puts (
"BUGS\n"
" If you do find any (or have other suggestions), mail Daniel\n"
" Stenberg <Daniel.Stenberg@haxx.se>.\n"
-"\n"
"AUTHORS / CONTRIBUTORS\n"
" - Daniel Stenberg <Daniel.Stenberg@haxx.se>\n"
" - Rafael Sagula <sagula@inf.ufrgs.br>\n"
@@ -717,7 +732,7 @@ puts (
" - Kristian Köhntopp <kris@koehntopp.de>\n"
" - Fred Noz <FNoz@siac.com>\n"
" - Caolan McNamara <caolan@csn.ul.ie>\n"
-"\n"
+" - Albert Chin-A-Young <china@thewrittenword.com>\n"
"WWW\n"
" http://curl.haxx.se\n"
"\n"
@@ -747,6 +762,8 @@ puts (
" Get a gopher document from funet's gopher server:\n"
"\n"
" curl gopher://gopher.funet.fi\n"
+);
+ puts(
"\n"
" Get a web page from a server using port 8000:\n"
"\n"
@@ -779,8 +796,6 @@ puts (
" To ftp files using name+passwd, include them in the URL like:\n"
"\n"
" curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
-);
- puts(
"\n"
" or specify them with the -u flag like\n"
"\n"
@@ -1043,6 +1058,8 @@ puts (
" headers that looks like 'Set-Cookie: <data>' where the data part then\n"
" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
+);
+ puts(
" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
" cookie should expire (\"expire=DATE\"), for what domain to use it\n"
" (\"domain=NAME\") and if it should be used on secure connections only\n"
@@ -1061,8 +1078,6 @@ puts (
" Curl also has the ability to use previously received cookies in following\n"
" sessions. If you get cookies from a server and store them in a file in a\n"
" manner similar to:\n"
-);
- puts(
"\n"
" curl --dump-header headers www.example.com\n"
"\n"
@@ -1313,6 +1328,8 @@ puts (
"TIME CONDITIONS\n"
"\n"
" HTTP allows a client to specify a time condition for the document it\n"
+);
+ puts(
" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to\n"
" specify them with the -z/--time-cond flag.\n"
"\n"
@@ -1332,8 +1349,6 @@ puts (
" curl -z yesterday http://remote.server.com/remote.html\n"
"\n"
" Curl will then accept a wide range of date formats. You always make the date\n"
-);
- puts(
" check the other way around by prepending it with a dash '-'.\n"
"\n"
"DICT\n"