Curl_add_custom_headers: support headers with no data
[platform/upstream/curl.git] / docs / curl.1
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH curl 1 "14 April 2009" "Curl 7.21.6" "Curl Manual"
24 .SH NAME
25 curl \- transfer a URL
26 .SH SYNOPSIS
27 .B curl [options]
28 .I [URL...]
29 .SH DESCRIPTION
30 .B curl
31 is a tool to transfer data from or to a server, using one of the supported
32 protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
33 LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP).  The
34 command is designed to work without user interaction.
35
36 curl offers a busload of useful tricks like proxy support, user
37 authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
38 resume and more. As you will see below, the number of features will make your
39 head spin!
40
41 curl is powered by libcurl for all transfer-related features. See
42 .BR libcurl (3)
43 for details.
44 .SH URL
45 The URL syntax is protocol-dependent. You'll find a detailed description in
46 RFC 3986.
47
48 You can specify multiple URLs or parts of URLs by writing part sets within
49 braces as in:
50
51  http://site.{one,two,three}.com
52
53 or you can get sequences of alphanumeric series by using [] as in:
54
55  ftp://ftp.numericals.com/file[1-100].txt
56  ftp://ftp.numericals.com/file[001-100].txt    (with leading zeros)
57  ftp://ftp.letters.com/file[a-z].txt
58
59 Nested sequences are not supported, but you can use several ones next to each
60 other:
61
62  http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
63
64 You can specify any amount of URLs on the command line. They will be fetched
65 in a sequential manner in the specified order.
66
67 You can specify a step counter for the ranges to get every Nth number or
68 letter:
69
70  http://www.numericals.com/file[1-100:10].txt
71  http://www.letters.com/file[a-z:2].txt
72
73 If you specify URL without protocol:// prefix, curl will attempt to guess what
74 protocol you might want. It will then default to HTTP but try other protocols
75 based on often-used host name prefixes. For example, for host names starting
76 with "ftp." curl will assume you want to speak FTP.
77
78 curl will do its best to use what you pass to it as a URL. It is not trying to
79 validate it as a syntactically correct URL by any means but is instead
80 \fBvery\fP liberal with what it accepts.
81
82 Curl will attempt to re-use connections for multiple file transfers, so that
83 getting many files from the same server will not do multiple connects /
84 handshakes. This improves speed. Of course this is only done on files
85 specified on a single command line and cannot be used between separate curl
86 invokes.
87 .SH "PROGRESS METER"
88 curl normally displays a progress meter during operations, indicating the amount
89 of transferred data, transfer speeds and estimated time left, etc.
90
91 curl displays this data to the terminal by default, so if you invoke curl to
92 do an operation and it is about to write data to the terminal, it
93 \fIdisables\fP the progress meter as otherwise it would mess up the output
94 mixing progress meter and response data.
95
96 If you want a progress meter for HTTP POST or PUT requests, you need to
97 redirect the response output to a file, using shell redirect (>), -o [file] or
98 similar.
99
100 It is not the same case for FTP upload as that operation does not spit out
101 any response data to the terminal.
102
103 If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
104 friend.
105 .SH OPTIONS
106 In general, all boolean options are enabled with --option and yet again
107 disabled with --\fBno-\fPoption. That is, you use the exact same option name
108 but prefix it with "no-". However, in this list we mostly only list and show
109 the --option version of them. (This concept with --no options was added in
110 7.19.0. Previously most options were toggled on/off on repeated use of the
111 same command line option.)
112 .IP "-#, --progress-bar"
113 Make curl display progress information as a progress bar instead of the
114 .IP "-0, --http1.0"
115 (HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
116 internally preferred: HTTP 1.1.
117 .IP "-1, --tlsv1"
118 (SSL)
119 Forces curl to use TLS version 1 when negotiating with a remote TLS server.
120 .IP "-2, --sslv2"
121 (SSL)
122 Forces curl to use SSL version 2 when negotiating with a remote SSL server.
123 .IP "-3, --sslv3"
124 (SSL)
125 Forces curl to use SSL version 3 when negotiating with a remote SSL server.
126 .IP "-4, --ipv4"
127 If libcurl is capable of resolving an address to multiple IP versions (which
128 it is if it is IPv6-capable), this option tells libcurl to resolve names to
129 IPv4 addresses only.
130 .IP "-6, --ipv6"
131 If libcurl is capable of resolving an address to multiple IP versions (which
132 it is if it is IPv6-capable), this option tells libcurl to resolve names to
133 IPv6 addresses only.
134 default statistics.
135 .IP "-a, --append"
136 (FTP/SFTP) When used in an upload, this will tell curl to append to the target
137 file instead of overwriting it. If the file doesn't exist, it will be created.
138 Note that this flag is ignored by some SSH servers (including OpenSSH).
139 .IP "-A, --user-agent <agent string>"
140 (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
141 done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
142 the string, surround the string with single quote marks. This can also be set
143 with the \fI-H, --header\fP option of course.
144
145 If this option is set more than once, the last one will be the one that's
146 used.
147 .IP "--anyauth"
148 (HTTP) Tells curl to figure out authentication method by itself, and use the
149 most secure one the remote site claims to support. This is done by first
150 doing a request and checking the response-headers, thus possibly inducing an
151 extra network round-trip. This is used instead of setting a specific
152 authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
153 \fI--ntlm\fP, and \fI--negotiate\fP.
154
155 Note that using --anyauth is not recommended if you do uploads from stdin,
156 since it may require data to be sent twice and then the client must be able to
157 rewind. If the need should arise when uploading from stdin, the upload
158 operation will fail.
159 .IP "-b, --cookie <name=data>"
160 (HTTP)
161 Pass the data to the HTTP server as a cookie. It is supposedly the
162 data previously received from the server in a "Set-Cookie:" line.
163 The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
164
165 If no '=' symbol is used in the line, it is treated as a filename to use to
166 read previously stored cookie lines from, which should be used in this session
167 if they match. Using this method also activates the "cookie parser" which will
168 make curl record incoming cookies too, which may be handy if you're using this
169 in combination with the \fI-L, --location\fP option. The file format of the
170 file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
171 cookie file format.
172
173 \fBNOTE\fP that the file specified with \fI-b, --cookie\fP is only used as
174 input. No cookies will be stored in the file. To store cookies, use the
175 \fI-c, --cookie-jar\fP option or you could even save the HTTP headers to a file
176 using \fI-D, --dump-header\fP!
177
178 If this option is set more than once, the last one will be the one that's
179 used.
180 .IP "-B, --use-ascii"
181 Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
182 enforced by using an URL that ends with ";type=A". This option causes data
183 sent to stdout to be in text mode for win32 systems.
184 .IP "--basic"
185 (HTTP) Tells curl to use HTTP Basic authentication. This is the default and
186 this option is usually pointless, unless you use it to override a previously
187 set option that sets a different authentication method (such as \fI--ntlm\fP,
188 \fI--digest\fP, or \fI--negotiate\fP).
189 .IP "-c, --cookie-jar <file name>"
190 Specify to which file you want curl to write all cookies after a completed
191 operation. Curl writes all cookies previously read from a specified file as
192 well as all cookies received from remote server(s). If no cookies are known,
193 no file will be written. The file will be written using the Netscape cookie
194 file format. If you set the file name to a single dash, "-", the cookies will
195 be written to stdout.
196
197 This command line option will activate the cookie engine that makes curl
198 record and use cookies. Another way to activate it is to use the \fI-b,
199 --cookie\fP option.
200
201 If the cookie jar can't be created or written to, the whole curl operation
202 won't fail or even report an error clearly. Using -v will get a warning
203 displayed, but that is the only visible feedback you get about this possibly
204 lethal situation.
205
206 If this option is used several times, the last specified file name will be
207 used.
208 .IP "-C, --continue-at <offset>"
209 Continue/Resume a previous file transfer at the given offset. The given offset
210 is the exact number of bytes that will be skipped, counting from the beginning
211 of the source file before it is transferred to the destination.  If used with
212 uploads, the FTP server command SIZE will not be used by curl.
213
214 Use "-C -" to tell curl to automatically find out where/how to resume the
215 transfer. It then uses the given output/input files to figure that out.
216
217 If this option is used several times, the last one will be used.
218 .IP "--ciphers <list of ciphers>"
219 (SSL) Specifies which ciphers to use in the connection. The list of ciphers
220 must specify valid ciphers. Read up on SSL cipher list details on this URL:
221 \fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
222
223 NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of
224 NSS ciphers is in the NSSCipherSuite entry at this URL:
225 \fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
226
227 If this option is used several times, the last one will override the others.
228 .IP "--compressed"
229 (HTTP) Request a compressed response using one of the algorithms libcurl
230 supports, and save the uncompressed document.  If this option is used and the
231 server sends an unsupported encoding, curl will report an error.
232 .IP "--connect-timeout <seconds>"
233 Maximum time in seconds that you allow the connection to the server to take.
234 This only limits the connection phase, once curl has connected this option is
235 of no more use. See also the \fI-m, --max-time\fP option.
236
237 If this option is used several times, the last one will be used.
238 .IP "--create-dirs"
239 When used in conjunction with the -o option, curl will create the necessary
240 local directory hierarchy as needed. This option creates the dirs mentioned
241 with the -o option, nothing else. If the -o file name uses no dir or if the
242 dirs it mentions already exist, no dir will be created.
243
244 To create remote directories when using FTP or SFTP, try
245 \fI--ftp-create-dirs\fP.
246 .IP "--crlf"
247 (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
248 .IP "--crlfile <file>"
249 (HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
250 List that may specify peer certificates that are to be considered revoked.
251
252 If this option is used several times, the last one will be used.
253
254 (Added in 7.19.7)
255 .IP "-d, --data <data>"
256 (HTTP) Sends the specified data in a POST request to the HTTP server, in the
257 same way that a browser does when a user has filled in an HTML form and
258 presses the submit button. This will cause curl to pass the data to the server
259 using the content-type application/x-www-form-urlencoded.  Compare to
260 \fI-F, --form\fP.
261
262 \fI-d, --data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
263 you should instead use the \fI--data-binary\fP option. To URL-encode the value
264 of a form field you may use \fI--data-urlencode\fP.
265
266 If any of these options is used more than once on the same command line, the
267 data pieces specified will be merged together with a separating
268 &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
269 chunk that looks like \&'name=daniel&skill=lousy'.
270
271 If you start the data with the letter @, the rest should be a file name to
272 read the data from, or - if you want curl to read the data from stdin.  The
273 contents of the file must already be URL-encoded. Multiple files can also be
274 specified. Posting data from a file named 'foobar' would thus be done with
275 \fI--data @foobar\fP.
276 .IP "-D, --dump-header <file>"
277 Write the protocol headers to the specified file.
278
279 This option is handy to use when you want to store the headers that a HTTP
280 site sends to you. Cookies from the headers could then be read in a second
281 curl invocation by using the \fI-b, --cookie\fP option! The
282 \fI-c, --cookie-jar\fP option is however a better way to store cookies.
283
284 When used in FTP, the FTP server response lines are considered being "headers"
285 and thus are saved there.
286
287 If this option is used several times, the last one will be used.  IP
288 "--data-ascii <data>" See \fI-d, --data\fP.
289 .IP "--data-binary <data>"
290 (HTTP) This posts data exactly as specified with no extra processing
291 whatsoever.
292
293 If you start the data with the letter @, the rest should be a filename.  Data
294 is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
295 are preserved and conversions are never done.
296
297 If this option is used several times, the ones following the first will append
298 data as described in \fI-d, --data\fP.
299 .IP "--data-urlencode <data>"
300 (HTTP) This posts data, similar to the other --data options with the exception
301 that this performs URL-encoding. (Added in 7.18.0)
302
303 To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
304 by a separator and a content specification. The <data> part can be passed to
305 curl using one of the following syntaxes:
306 .RS
307 .IP "content"
308 This will make curl URL-encode the content and pass that on. Just be careful
309 so that the content doesn't contain any = or @ symbols, as that will then make
310 the syntax match one of the other cases below!
311 .IP "=content"
312 This will make curl URL-encode the content and pass that on. The preceding =
313 symbol is not included in the data.
314 .IP "name=content"
315 This will make curl URL-encode the content part and pass that on. Note that
316 the name part is expected to be URL-encoded already.
317 .IP "@filename"
318 This will make curl load data from the given file (including any newlines),
319 URL-encode that data and pass it on in the POST.
320 .IP "name@filename"
321 This will make curl load data from the given file (including any newlines),
322 URL-encode that data and pass it on in the POST. The name part gets an equal
323 sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
324 name is expected to be URL-encoded already.
325 .RE
326 .IP "--delegation LEVEL"
327 Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
328 comes to user credentials. Used with GSS/kerberos.
329 .RS
330 .IP "none"
331 Don't allow any delegation.
332 .IP "policy"
333 Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
334 service ticket, which is a matter of realm policy.
335 .IP "always"
336 Unconditionally allow the server to delegate.
337 .RE
338 .IP "--digest"
339 (HTTP) Enables HTTP Digest authentication. This is a authentication that
340 prevents the password from being sent over the wire in clear text. Use this in
341 combination with the normal \fI-u, --user\fP option to set user name and
342 password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
343 related options.
344
345 If this option is used several times, the following occurrences make no
346 difference.
347 .IP "--disable-eprt"
348 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
349 active FTP transfers. Curl will normally always first attempt to use EPRT,
350 then LPRT before using PORT, but with this option, it will use PORT right
351 away. EPRT and LPRT are extensions to the original FTP protocol, and may not work
352 on all servers, but they enable more functionality in a better way than the
353 traditional PORT command.
354
355 \fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
356 is an alias for \fB--disable-eprt\fP.
357
358 Disabling EPRT only changes the active behavior. If you want to switch to
359 passive mode you need to not use \fI-P, --ftp-port\fP or force it with
360 \fI--ftp-pasv\fP.
361 .IP "--disable-epsv"
362 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
363 transfers. Curl will normally always first attempt to use EPSV before PASV,
364 but with this option, it will not try using EPSV.
365
366 \fB--epsv\fP can be used to explicitly enable EPRT again and \fB--no-epsv\fP
367 is an alias for \fB--disable-epsv\fP.
368
369 Disabling EPSV only changes the passive behavior. If you want to switch to
370 active mode you need to use \fI-P, --ftp-port\fP.
371 .IP "-e, --referer <URL>"
372 (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
373 be set with the \fI-H, --header\fP flag of course.  When used with
374 \fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
375 automatically set the previous URL when it follows a Location: header. The
376 \&";auto" string can be used alone, even if you don't set an initial --referer.
377
378 If this option is used several times, the last one will be used.
379 .IP "-E, --cert <certificate[:password]>"
380 (SSL) Tells curl to use the specified client certificate file when getting a
381 file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
382 in PEM format.  If the optional password isn't specified, it will be queried
383 for on the terminal. Note that this option assumes a \&"certificate" file that
384 is the private key and the private certificate concatenated! See \fI--cert\fP
385 and \fI--key\fP to specify them independently.
386
387 If curl is built against the NSS SSL library then this option can tell
388 curl the nickname of the certificate to use within the NSS database defined
389 by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
390 NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
391 loaded. If you want to use a file from the current directory, please precede
392 it with "./" prefix, in order to avoid confusion with a nickname.
393
394 If this option is used several times, the last one will be used.
395 .IP "--engine <name>"
396 Select the OpenSSL crypto engine to use for cipher
397 operations. Use \fI--engine list\fP to print a list of build-time supported
398 engines. Note that not all (or none) of the engines may be available at
399 run-time.
400 .IP "--environment"
401 (RISC OS ONLY) Sets a range of environment variables, using the names the -w
402 option supports, to allow easier extraction of useful information after having
403 run curl.
404 .IP "--egd-file <file>"
405 (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
406 is used to seed the random engine for SSL connections. See also the
407 \fI--random-file\fP option.
408 .IP "--cert-type <type>"
409 (SSL) Tells curl what certificate type the provided certificate is in. PEM,
410 DER and ENG are recognized types.  If not specified, PEM is assumed.
411
412 If this option is used several times, the last one will be used.
413 .IP "--cacert <CA certificate>"
414 (SSL) Tells curl to use the specified certificate file to verify the peer. The
415 file may contain multiple CA certificates. The certificate(s) must be in PEM
416 format. Normally curl is built to use a default file for this, so this option
417 is typically used to alter that default file.
418
419 curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
420 set, and uses the given path as a path to a CA cert bundle. This option
421 overrides that variable.
422
423 The windows version of curl will automatically look for a CA certs file named
424 \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
425 Current Working Directory, or in any folder along your PATH.
426
427 If curl is built against the NSS SSL library then this option tells
428 curl the nickname of the CA certificate to use within the NSS database
429 defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb).
430 If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files
431 may be loaded.
432
433 If this option is used several times, the last one will be used.
434 .IP "--capath <CA certificate directory>"
435 (SSL) Tells curl to use the specified certificate directory to verify the
436 peer. The certificates must be in PEM format, and if curl is built against
437 OpenSSL, the directory must have been processed using the c_rehash utility
438 supplied with OpenSSL. Using \fI--capath\fP can allow OpenSSL-powered curl to
439 make SSL-connections much more efficiently than using \fI--cacert\fP if the
440 \fI--cacert\fP file contains many CA certificates.
441
442 If this option is used several times, the last one will be used.
443 .IP "-f, --fail"
444 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
445 to better enable scripts etc to better deal with failed attempts. In
446 normal cases when a HTTP server fails to deliver a document, it returns an
447 HTML document stating so (which often also describes why and more). This flag
448 will prevent curl from outputting that and return error 22.
449
450 This method is not fail-safe and there are occasions where non-successful
451 response codes will slip through, especially when authentication is involved
452 (response codes 401 and 407).
453 .IP "-F, --form <name=content>"
454 (HTTP) This lets curl emulate a filled-in form in which a user has pressed the
455 submit button. This causes curl to POST data using the Content-Type
456 multipart/form-data according to RFC 2388. This enables uploading of binary
457 files etc. To force the 'content' part to be a file, prefix the file name
458 with an @ sign. To just get the content part from a file, prefix the file name
459 with the symbol <. The difference between @ and < is then that @ makes a file
460 get attached in the post as a file upload, while the < makes a text field and
461 just get the contents for that text field from a file.
462
463 Example, to send your password file to the server, where
464 \&'password' is the name of the form-field to which /etc/passwd will be the
465 input:
466
467 \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
468
469 To read content from stdin instead of a file, use - as the filename. This goes
470 for both @ and < constructs.
471
472 You can also tell curl what Content-Type to use by using 'type=', in a manner
473 similar to:
474
475 \fBcurl\fP -F "web=@index.html;type=text/html" url.com
476
477 or
478
479 \fBcurl\fP -F "name=daniel;type=text/foo" url.com
480
481 You can also explicitly change the name field of a file upload part by setting
482 filename=, like this:
483
484 \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
485
486 See further examples and details in the MANUAL.
487
488 This option can be used multiple times.
489 .IP "--ftp-account [data]"
490 (FTP) When an FTP server asks for "account data" after user name and password
491 has been provided, this data is sent off using the ACCT command. (Added in
492 7.13.0)
493
494 If this option is used twice, the second will override the previous use.
495 .IP "--ftp-alternative-to-user <command>"
496 (FTP) If authenticating with the USER and PASS commands fails, send this
497 command.  When connecting to Tumbleweed's Secure Transport server over FTPS
498 using a client certificate, using "SITE AUTH" will tell the server to retrieve
499 the username from the certificate. (Added in 7.15.5)
500 .IP "--ftp-create-dirs"
501 (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
502 currently exist on the server, the standard behavior of curl is to
503 fail. Using this option, curl will instead attempt to create missing
504 directories.
505 .IP "--ftp-method [method]"
506 (FTP) Control what method curl should use to reach a file on a FTP(S)
507 server. The method argument should be one of the following alternatives:
508 .RS
509 .IP multicwd
510 curl does a single CWD operation for each path part in the given URL. For deep
511 hierarchies this means very many commands. This is how RFC 1738 says it should
512 be done. This is the default but the slowest behavior.
513 .IP nocwd
514 curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
515 path to the server for all these commands. This is the fastest behavior.
516 .IP singlecwd
517 curl does one CWD with the full target directory and then operates on the file
518 \&"normally" (like in the multicwd case). This is somewhat more standards
519 compliant than 'nocwd' but without the full penalty of 'multicwd'.
520 .RE
521 (Added in 7.15.1)
522 .IP "--ftp-pasv"
523 (FTP) Use passive mode for the data connection. Passive is the internal default
524 behavior, but using this option can be used to override a previous
525 \fI-P/-ftp-port\fP option. (Added in 7.11.0)
526
527 If this option is used several times, the following occurrences make no
528 difference. Undoing an enforced passive really isn't doable but you must then
529 instead enforce the correct \fI-P, --ftp-port\fP again.
530
531 Passive mode means that curl will try the EPSV command first and then PASV,
532 unless \fI--disable-epsv\fP is used.
533 .IP "--ftp-skip-pasv-ip"
534 (FTP) Tell curl to not use the IP address the server suggests in its response
535 to curl's PASV command when curl connects the data connection. Instead curl
536 will re-use the same IP address it already uses for the control
537 connection. (Added in 7.14.2)
538
539 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
540 .IP "--ftp-pret"
541 (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain
542 FTP servers, mainly drftpd, require this non-standard command for
543 directory listings as well as up and downloads in PASV mode.
544 (Added in 7.20.x)
545 .IP "--ftp-ssl-ccc"
546 (FTP) Use CCC (Clear Command Channel)
547 Shuts down the SSL/TLS layer after authenticating. The rest of the
548 control channel communication will be unencrypted. This allows
549 NAT routers to follow the FTP transaction. The default mode is
550 passive. See --ftp-ssl-ccc-mode for other modes.
551 (Added in 7.16.1)
552 .IP "--ftp-ssl-ccc-mode [active/passive]"
553 (FTP) Use CCC (Clear Command Channel)
554 Sets the CCC mode. The passive mode will not initiate the shutdown, but
555 instead wait for the server to do it, and will not reply to the
556 shutdown from the server. The active mode initiates the shutdown and
557 waits for a reply from the server.
558 (Added in 7.16.2)
559 .IP "--ftp-ssl-control"
560 (FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
561 authentication, but non-encrypted data transfers for efficiency.  Fails the
562 transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0)
563 that can still be used but will be removed in a future version.
564 .IP "--form-string <name=string>"
565 (HTTP) Similar to \fI--form\fP except that the value string for the named
566 parameter is used literally. Leading \&'@' and \&'<' characters, and the
567 \&';type=' string in the value have no special meaning. Use this in preference
568 to \fI--form\fP if there's any possibility that the string value may
569 accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
570 .IP "-g, --globoff"
571 This option switches off the "URL globbing parser". When you set this option,
572 you can specify URLs that contain the letters {}[] without having them being
573 interpreted by curl itself. Note that these letters are not normal legal URL
574 contents but they should be encoded according to the URI standard.
575 .IP "-G, --get"
576 When used, this option will make all data specified with \fI-d, --data\fP or
577 \fI--data-binary\fP to be used in a HTTP GET request instead of the POST
578 request that otherwise would be used. The data will be appended to the URL
579 with a '?' separator.
580
581 If used in combination with -I, the POST data will instead be appended to the
582 URL with a HEAD request.
583
584 If this option is used several times, the following occurrences make no
585 difference. This is because undoing a GET doesn't make sense, but you should
586 then instead enforce the alternative method you prefer.
587 .IP "-H, --header <header>"
588 (HTTP) Extra header to use when getting a web page. You may specify any number
589 of extra headers. Note that if you should add a custom header that has the
590 same name as one of the internal ones curl would use, your externally set
591 header will be used instead of the internal one. This allows you to make even
592 trickier stuff than curl would normally do. You should not replace internally
593 set headers without knowing perfectly well what you're doing. Remove an
594 internal header by giving a replacement without content on the right side of
595 the colon, as in: -H \&"Host:". If you send the custom header with no-value then
596 its header must be terminated with a semicolon, such as \-H "X-Custom-Header;"
597 to send "X-Custom-Header:".
598
599 curl will make sure that each header you add/replace is sent with the proper
600 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
601 content: do not add newlines or carriage returns, they will only mess things up
602 for you.
603
604 See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
605
606 This option can be used multiple times to add/replace/remove multiple headers.
607 .IP "--hostpubmd5 <md5>"
608 Pass a string containing 32 hexadecimal digits. The string should be the 128
609 bit MD5 checksum of the remote host's public key, curl will refuse the
610 connection with the host unless the md5sums match. This option is only for SCP
611 and SFTP transfers. (Added in 7.17.1)
612 .IP "--ignore-content-length"
613 (HTTP)
614 Ignore the Content-Length header. This is particularly useful for servers
615 running Apache 1.x, which will report incorrect Content-Length for files
616 larger than 2 gigabytes.
617 .IP "-i, --include"
618 (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
619 like server-name, date of the document, HTTP-version and more...
620 .IP "-I, --head"
621 (HTTP/FTP/FILE)
622 Fetch the HTTP-header only! HTTP-servers feature the command HEAD
623 which this uses to get nothing but the header of a document. When used
624 on a FTP or FILE file, curl displays the file size and last modification
625 time only.
626 .IP "--interface <name>"
627 Perform an operation using a specified interface. You can enter interface
628 name, IP address or host name. An example could look like:
629
630  curl --interface eth0:1 http://www.netscape.com/
631
632 If this option is used several times, the last one will be used.
633 .IP "-j, --junk-session-cookies"
634 (HTTP) When curl is told to read cookies from a given file, this option will
635 make it discard all "session cookies". This will basically have the same effect
636 as if a new session is started. Typical browsers always discard session
637 cookies when they're closed down.
638 .IP "-J, --remote-header-name"
639 (HTTP) This option tells the -O, --remote-name option to use the server-specified
640 Content-Disposition filename instead of extracting a filename from the URL.
641 .IP "-k, --insecure"
642 (SSL) This option explicitly allows curl to perform "insecure" SSL connections
643 and transfers. All SSL connections are attempted to be made secure by using
644 the CA certificate bundle installed by default. This makes all connections
645 considered "insecure" fail unless \fI-k, --insecure\fP is used.
646
647 See this online resource for further details:
648 \fBhttp://curl.haxx.se/docs/sslcerts.html\fP
649 .IP "-K, --config <config file>"
650 Specify which config file to read curl arguments from. The config file is a
651 text file in which command line arguments can be written which then will be
652 used as if they were written on the actual command line. Options and their
653 parameters must be specified on the same config file line, separated by
654 whitespace, colon, the equals sign or any combination thereof (however,
655 the preferred separator is the equals sign). If the parameter is to contain
656 whitespace, the parameter must be enclosed within quotes. Within double
657 quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
658 \\r and \\v. A backslash preceding any other letter is ignored. If the
659 first column of a config line is a '#' character, the rest of the line will be
660 treated as a comment. Only write one option per physical line in the config
661 file.
662
663 Specify the filename to -K, --config as '-' to make curl read the file from
664 stdin.
665
666 Note that to be able to specify a URL in the config file, you need to specify
667 it using the \fI--url\fP option, and not by simply writing the URL on its own
668 line. So, it could look similar to this:
669
670 url = "http://curl.haxx.se/docs/"
671
672 Long option names can optionally be given in the config file without the
673 initial double dashes.
674
675 When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
676 config file and uses it if found. The default config file is checked for in
677 the following places in this order:
678
679 1) curl tries to find the "home dir": It first checks for the CURL_HOME and
680 then the HOME environment variables. Failing that, it uses getpwuid() on
681 UNIX-like systems (which returns the home dir given the current user in your
682 system). On Windows, it then checks for the APPDATA variable, or as a last
683 resort the '%USERPROFILE%\\Application Data'.
684
685 2) On windows, if there is no _curlrc file in the home dir, it checks for one
686 in the same dir the curl executable is placed. On UNIX-like systems, it will
687 simply try to load .curlrc from the determined home dir.
688
689 .nf
690 # --- Example file ---
691 # this is a comment
692 url = "curl.haxx.se"
693 output = "curlhere.html"
694 user-agent = "superagent/1.0"
695
696 # and fetch another URL too
697 url = "curl.haxx.se/docs/manpage.html"
698 -O
699 referer = "http://nowhereatall.com/"
700 # --- End of example file ---
701 .fi
702
703 This option can be used multiple times to load multiple config files.
704 .IP "--keepalive-time <seconds>"
705 This option sets the time a connection needs to remain idle before sending
706 keepalive probes and the time between individual keepalive probes. It is
707 currently effective on operating systems offering the TCP_KEEPIDLE and
708 TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
709 option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
710
711 If this option is used multiple times, the last occurrence sets the amount.
712 .IP "--key <key>"
713 (SSL/SSH) Private key file name. Allows you to provide your private key in this
714 separate file.
715
716 If this option is used several times, the last one will be used.
717 .IP "--key-type <type>"
718 (SSL) Private key file type. Specify which type your \fI--key\fP provided
719 private key is. DER, PEM, and ENG are supported. If not specified, PEM is
720 assumed.
721
722 If this option is used several times, the last one will be used.
723 .IP "--krb <level>"
724 (FTP) Enable Kerberos authentication and use. The level must be entered and
725 should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
726 a level that is not one of these, 'private' will instead be used.
727
728 This option requires a library built with kerberos4 or GSSAPI
729 (GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to
730 see if your curl supports it.
731
732 If this option is used several times, the last one will be used.
733 .IP "-l, --list-only"
734 (FTP)
735 When listing an FTP directory, this switch forces a name-only view.
736 Especially useful if you want to machine-parse the contents of an FTP
737 directory since the normal directory view doesn't use a standard look
738 or format.
739
740 This option causes an FTP NLST command to be sent.  Some FTP servers
741 list only files in their response to NLST; they do not include
742 subdirectories and symbolic links.
743
744 .IP "-L, --location"
745 (HTTP/HTTPS) If the server reports that the requested page has moved to a
746 different location (indicated with a Location: header and a 3XX response code),
747 this option will make curl redo the request on the new place. If used together
748 with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
749 will be shown. When authentication is used, curl only sends its credentials to
750 the initial host. If a redirect takes curl to a different host, it won't be
751 able to intercept the user+password. See also \fI--location-trusted\fP on how
752 to change this. You can limit the amount of redirects to follow by using the
753 \fI--max-redirs\fP option.
754
755 When curl follows a redirect and the request is not a plain GET (for example
756 POST or PUT), it will do the following request with a GET if the HTTP response
757 was 301, 302, or 303. If the response code was any other 3xx code, curl will
758 re-send the following request using the same unmodified method.
759 .IP "--libcurl <file>"
760 Append this option to any ordinary curl command line, and you will get a
761 libcurl-using source code written to the file that does the equivalent
762 of what your command-line operation does!
763
764 NOTE: this does not properly support -F and the sending of multipart
765 formposts, so in those cases the output program will be missing necessary
766 calls to \fIcurl_formadd(3)\fP, and possibly more.
767
768 If this option is used several times, the last given file name will be
769 used. (Added in 7.16.1)
770 .IP "--limit-rate <speed>"
771 Specify the maximum transfer rate you want curl to use. This feature is useful
772 if you have a limited pipe and you'd like your transfer not to use your entire
773 bandwidth.
774
775 The given speed is measured in bytes/second, unless a suffix is appended.
776 Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
777 megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
778
779 The given rate is the average speed counted during the entire transfer. It
780 means that curl might use higher transfer speeds in short bursts, but over
781 time it uses no more than the given rate.
782
783 If you also use the \fI-Y, --speed-limit\fP option, that option will take
784 precedence and might cripple the rate-limiting slightly, to help keeping the
785 speed-limit logic working.
786
787 If this option is used several times, the last one will be used.
788 .IP "--local-port <num>[-num]"
789 Set a preferred number or range of local port numbers to use for the
790 connection(s).  Note that port numbers by nature are a scarce resource that
791 will be busy at times so setting this range to something too narrow might
792 cause unnecessary connection setup failures. (Added in 7.15.2)
793 .IP "--location-trusted"
794 (HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
795 password to all hosts that the site may redirect to. This may or may not
796 introduce a security breach if the site redirects you to a site to which
797 you'll send your authentication info (which is plaintext in the case of HTTP
798 Basic authentication).
799 .IP "-m, --max-time <seconds>"
800 Maximum time in seconds that you allow the whole operation to take.  This is
801 useful for preventing your batch jobs from hanging for hours due to slow
802 networks or links going down.  See also the \fI--connect-timeout\fP option.
803
804 If this option is used several times, the last one will be used.
805 .IP "--mail-from <address>"
806 (SMTP) Specify a single address that the given mail should get sent from.
807
808 (Added in 7.20.0)
809 .IP "--max-filesize <bytes>"
810 Specify the maximum size (in bytes) of a file to download. If the file
811 requested is larger than this value, the transfer will not start and curl will
812 return with exit code 63.
813
814 \fBNOTE:\fP The file size is not always known prior to download, and for such files
815 this option has no effect even if the file transfer ends up being larger than
816 this given limit. This concerns both FTP and HTTP transfers.
817 .IP "--mail-rcpt <address>"
818 (SMTP) Specify a single address that the given mail should get sent to. This
819 option can be used multiple times to specify many recipients.
820
821 (Added in 7.20.0)
822 .IP "--max-redirs <num>"
823 Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
824 is used, this option can be used to prevent curl from following redirections
825 \&"in absurdum". By default, the limit is set to 50 redirections. Set this
826 option to -1 to make it limitless.
827
828 If this option is used several times, the last one will be used.
829 .IP "-n, --netrc"
830 Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
831 home directory for login name and password. This is typically used for FTP on
832 UNIX. If used with HTTP, curl will enable user authentication. See
833 .BR netrc(4)
834 or
835 .BR ftp(1)
836 for details on the file format. Curl will not complain if that file
837 doesn't have the right permissions (it should not be either world- or
838 group-readable). The environment variable "HOME" is used to find the home
839 directory.
840
841 A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
842 to FTP to the machine host.domain.com with user name \&'myself' and password
843 \&'secret' should look similar to:
844
845 .B "machine host.domain.com login myself password secret"
846 .IP "-N, --no-buffer"
847 Disables the buffering of the output stream. In normal work situations, curl
848 will use a standard buffered output stream that will have the effect that it
849 will output the data in chunks, not necessarily exactly when the data arrives.
850 Using this option will disable that buffering.
851
852 Note that this is the negated option name documented. You can thus use
853 \fI--buffer\fP to enforce the buffering.
854 .IP "--netrc-file"
855 This option is similar to \fI--netrc\fP, except that you provide the path
856 (absolute or relative) to the netrc file that Curl should use.
857 You can only specify one netrc file per invocation. If several
858 \fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
859 (Added in 7.21.5)
860
861 This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
862 It will also abide by --netrc-optional if specified.
863
864 .IP "--netrc-optional"
865 Very similar to \fI--netrc\fP, but this option makes the .netrc usage
866 \fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
867
868 .IP "--negotiate"
869 (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
870 designed by Microsoft and is used in their web applications. It is primarily
871 meant as a support for Kerberos5 authentication but may be also used along
872 with another authentication method. For more information see IETF draft
873 draft-brezak-spnego-http-04.txt.
874
875 If you want to enable Negotiate for your proxy authentication, then use
876 \fI--proxy-negotiate\fP.
877
878 This option requires a library built with GSSAPI support. This is
879 not very common. Use \fI-V, --version\fP to see if your version supports
880 GSS-Negotiate.
881
882 When using this option, you must also provide a fake -u, --user option to
883 activate the authentication code properly. Sending a '-u :' is enough as the
884 user name and password from the -u option aren't actually used.
885
886 If this option is used several times, the following occurrences make no
887 difference.
888 .IP "--no-keepalive"
889 Disables the use of keepalive messages on the TCP connection, as by default
890 curl enables them.
891
892 Note that this is the negated option name documented. You can thus use
893 \fI--keepalive\fP to enforce keepalive.
894 .IP "--no-sessionid"
895 (SSL) Disable curl's use of SSL session-ID caching.  By default all transfers
896 are done using the cache. Note that while nothing should ever get hurt by
897 attempting to reuse SSL session-IDs, there seem to be broken SSL
898 implementations in the wild that may require you to disable this in order for
899 you to succeed. (Added in 7.16.0)
900
901 Note that this is the negated option name documented. You can thus use
902 \fI--sessionid\fP to enforce session-ID caching.
903 .IP "--noproxy <no-proxy-list>"
904 Comma-separated list of hosts which do not use a proxy, if one is specified.
905 The only wildcard is a single * character, which matches all hosts, and
906 effectively disables the proxy. Each name in this list is matched as either
907 a domain which contains the hostname, or the hostname itself. For example,
908 local.com would match local.com, local.com:80, and www.local.com, but not
909 www.notlocal.com.  (Added in 7.19.4).
910 .IP "--ntlm"
911 (HTTP) Enables NTLM authentication. The NTLM authentication method was
912 designed by Microsoft and is used by IIS web servers. It is a proprietary
913 protocol, reverse-engineered by clever people and implemented in curl based
914 on their efforts. This kind of behavior should not be endorsed, you should
915 encourage everyone who uses NTLM to switch to a public and documented
916 authentication method instead, such as Digest.
917
918 If you want to enable NTLM for your proxy authentication, then use
919 \fI--proxy-ntlm\fP.
920
921 This option requires a library built with SSL support. Use
922 \fI-V, --version\fP to see if your curl supports NTLM.
923
924 If this option is used several times, the following occurrences make no
925 difference.
926 .IP "-o, --output <file>"
927 Write output to <file> instead of stdout. If you are using {} or [] to fetch
928 multiple documents, you can use '#' followed by a number in the <file>
929 specifier. That variable will be replaced with the current string for the URL
930 being fetched. Like in:
931
932   curl http://{one,two}.site.com -o "file_#1.txt"
933
934 or use several variables like:
935
936   curl http://{site,host}.host[1-5].com -o "#1_#2"
937
938 You may use this option as many times as the number of URLs you have.
939
940 See also the \fI--create-dirs\fP option to create the local directories
941 dynamically. Specifying the output as '-' (a single dash) will force the
942 output to be done to stdout.
943 .IP "-O, --remote-name"
944 Write output to a local file named like the remote file we get. (Only the file
945 part of the remote file is used, the path is cut off.)
946
947 The remote file name to use for saving is extracted from the given URL,
948 nothing else.
949
950 Consequentially, the file will be saved in the current working directory. If
951 you want the file saved in a different directory, make sure you change current
952 working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
953
954 You may use this option as many times as the number of URLs you have.
955 .IP "-p, --proxytunnel"
956 When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
957 protocols to attempt to tunnel through the proxy instead of merely using it to
958 do HTTP-like operations. The tunnel approach is made with the HTTP proxy
959 CONNECT request and requires that the proxy allows direct connect to the
960 remote port number curl wants to tunnel through to.
961 .IP "-P, --ftp-port <address>"
962 (FTP) Reverses the default initiator/listener roles when connecting with
963 FTP. This switch makes curl use active mode. In practice, curl then tells the
964 server to connect back to the client's specified address and port, while
965 passive mode asks the server to setup an IP address and port for it to connect
966 to. <address> should be one of:
967 .RS
968 .IP interface
969 i.e "eth0" to specify which interface's IP address you want to use (Unix only)
970 .IP "IP address"
971 i.e "192.168.10.1" to specify the exact IP address
972 .IP "host name"
973 i.e "my.host.domain" to specify the machine
974 .IP "-"
975 make curl pick the same IP address that is already used for the control
976 connection
977 .RE
978
979 If this option is used several times, the last one will be used. Disable the
980 use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
981 instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
982
983 Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
984 address, to tell curl what TCP port range to use. That means you specify a
985 port range, from a lower to a higher number. A single number works as well,
986 but do note that it increases the risk of failure since the port may not be
987 available.
988 .IP "--pass <phrase>"
989 (SSL/SSH) Passphrase for the private key
990
991 If this option is used several times, the last one will be used.
992 .IP "--post301"
993 Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
994 requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
995 in web browsers, so curl does the conversion by default to maintain
996 consistency. However, a server may require a POST to remain a POST after such
997 a redirection. This option is meaningful only when using \fI-L, --location\fP
998 (Added in 7.17.1)
999 .IP "--post302"
1000 Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
1001 requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
1002 in web browsers, so curl does the conversion by default to maintain
1003 consistency. However, a server may require a POST to remain a POST after such
1004 a redirection. This option is meaningful only when using \fI-L, --location\fP
1005 (Added in 7.19.1)
1006 .IP "--proto <protocols>"
1007 Tells curl to use the listed protocols for its initial retrieval. Protocols
1008 are evaluated left to right, are comma separated, and are each a protocol
1009 name or 'all', optionally prefixed by zero or more modifiers. Available
1010 modifiers are:
1011 .RS
1012 .TP 3
1013 .B +
1014 Permit this protocol in addition to protocols already permitted (this is
1015 the default if no modifier is used).
1016 .TP
1017 .B -
1018 Deny this protocol, removing it from the list of protocols already permitted.
1019 .TP
1020 .B =
1021 Permit only this protocol (ignoring the list already permitted), though
1022 subject to later modification by subsequent entries in the comma separated
1023 list.
1024 .RE
1025 .IP
1026 For example:
1027 .RS
1028 .TP 15
1029 .B --proto -ftps
1030 uses the default protocols, but disables ftps
1031 .TP
1032 .B  --proto -all,https,+http
1033 only enables http and https
1034 .TP
1035 .B --proto =http,https
1036 also only enables http and https
1037 .RE
1038 .IP
1039 Unknown protocols produce a warning. This allows scripts to safely rely on
1040 being able to disable potentially dangerous protocols, without relying upon
1041 support for that protocol being built into curl to avoid an error.
1042
1043 This option can be used multiple times, in which case the effect is the same
1044 as concatenating the protocols into one instance of the option.
1045
1046 (Added in 7.20.2)
1047 .IP "--proto-redir <protocols>"
1048 Tells curl to use the listed protocols after a redirect. See --proto for
1049 how protocols are represented.
1050
1051 (Added in 7.20.2)
1052 .IP "--proxy-anyauth"
1053 Tells curl to pick a suitable authentication method when communicating with
1054 the given proxy. This might cause an extra request/response round-trip. (Added
1055 in 7.13.2)
1056 .IP "--proxy-basic"
1057 Tells curl to use HTTP Basic authentication when communicating with the given
1058 proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
1059 the default authentication method curl uses with proxies.
1060 .IP "--proxy-digest"
1061 Tells curl to use HTTP Digest authentication when communicating with the given
1062 proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
1063 .IP "--proxy-negotiate"
1064 Tells curl to use HTTP Negotiate authentication when communicating
1065 with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
1066 with a remote host. (Added in 7.17.1)
1067 .IP "--proxy-ntlm"
1068 Tells curl to use HTTP NTLM authentication when communicating with the given
1069 proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
1070 .IP "--proxy1.0 <proxyhost[:port]>"
1071 Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
1072 assumed at port 1080.
1073
1074 The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
1075 is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
1076 protocol instead of the default HTTP 1.1.
1077 .IP "--pubkey <key>"
1078 (SSH) Public key file name. Allows you to provide your public key in this
1079 separate file.
1080
1081 If this option is used several times, the last one will be used.
1082 .IP "-q"
1083 If used as the first parameter on the command line, the \fIcurlrc\fP config
1084 file will not be read and used. See the \fI-K, --config\fP for details on the
1085 default config file search path.
1086 .IP "-Q, --quote <command>"
1087 (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
1088 commands are sent BEFORE the transfer takes place (just after the initial PWD
1089 command in an FTP transfer, to be exact). To make commands take place after a
1090 successful transfer, prefix them with a dash '-'.  To make commands be sent
1091 after libcurl has changed the working directory, just before the transfer
1092 command(s), prefix the command with a '+' (this is only supported for
1093 FTP). You may specify any number of commands. If the server returns failure
1094 for one of the commands, the entire operation will be aborted. You must send
1095 syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
1096 of the commands listed below to SFTP servers.  This option can be used
1097 multiple times. When speaking to a FTP server, prefix the command with an
1098 asterisk (*) to make libcurl continue even if the command fails as by default
1099 curl will stop at first failure.
1100
1101 SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
1102 commands itself before sending them to the server.  File names may be quoted
1103 shell-style to embed spaces or special characters.  Following is the list of
1104 all supported SFTP quote commands:
1105 .RS
1106 .IP "chgrp group file"
1107 The chgrp command sets the group ID of the file named by the file operand to the
1108 group ID specified by the group operand. The group operand is a decimal
1109 integer group ID.
1110 .IP "chmod mode file"
1111 The chmod command modifies the file mode bits of the specified file. The
1112 mode operand is an octal integer mode number.
1113 .IP "chown user file"
1114 The chown command sets the owner of the file named by the file operand to the
1115 user ID specified by the user operand. The user operand is a decimal
1116 integer user ID.
1117 .IP "ln source_file target_file"
1118 The ln and symlink commands create a symbolic link at the target_file location
1119 pointing to the source_file location.
1120 .IP "mkdir directory_name"
1121 The mkdir command creates the directory named by the directory_name operand.
1122 .IP "pwd"
1123 The pwd command returns the absolute pathname of the current working directory.
1124 .IP "rename source target"
1125 The rename command renames the file or directory named by the source
1126 operand to the destination path named by the target operand.
1127 .IP "rm file"
1128 The rm command removes the file specified by the file operand.
1129 .IP "rmdir directory"
1130 The rmdir command removes the directory entry specified by the directory
1131 operand, provided it is empty.
1132 .IP "symlink source_file target_file"
1133 See ln.
1134 .RE
1135 .IP "-r, --range <range>"
1136 (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
1137 HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
1138 in a number of ways.
1139 .RS
1140 .TP 10
1141 .B 0-499
1142 specifies the first 500 bytes
1143 .TP
1144 .B 500-999
1145 specifies the second 500 bytes
1146 .TP
1147 .B -500
1148 specifies the last 500 bytes
1149 .TP
1150 .B 9500-
1151 specifies the bytes from offset 9500 and forward
1152 .TP
1153 .B 0-0,-1
1154 specifies the first and last byte only(*)(H)
1155 .TP
1156 .B 500-700,600-799
1157 specifies 300 bytes from offset 500(H)
1158 .TP
1159 .B 100-199,500-599
1160 specifies two separate 100-byte ranges(*)(H)
1161 .RE
1162
1163 (*) = NOTE that this will cause the server to reply with a multipart
1164 response!
1165
1166 Only digit characters (0-9) are valid in the 'start' and 'stop' fields of
1167 the \&'start-stop' range syntax. If a non-digit character is given in the range, the server's
1168 response will be unspecified, depending on the server's configuration.
1169
1170 You should also be aware that many HTTP/1.1 servers do not have this feature
1171 enabled, so that when you attempt to get a range, you'll instead get the whole
1172 document.
1173
1174 FTP and SFTP range downloads only support the simple 'start-stop' syntax
1175 (optionally with one of the numbers omitted). FTP use depends on the extended
1176 FTP command SIZE.
1177
1178 If this option is used several times, the last one will be used.
1179 .IP "-R, --remote-time"
1180 When used, this will make libcurl attempt to figure out the timestamp of the
1181 remote file, and if that is available make the local file get that same
1182 timestamp.
1183 .IP "--random-file <file>"
1184 (SSL) Specify the path name to file containing what will be considered as
1185 random data. The data is used to seed the random engine for SSL connections.
1186 See also the \fI--egd-file\fP option.
1187 .IP "--raw"
1188 When used, it disables all internal HTTP decoding of content or transfer
1189 encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
1190 .IP "--remote-name-all"
1191 This option changes the default action for all given URLs to be dealt with as
1192 if \fI-O, --remote-name\fP were used for each one. So if you want to disable
1193 that for a specific URL after \fI--remote-name-all\fP has been used, you must
1194 use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
1195 .IP "--resolve <host:port:address>"
1196 Provide a custom address for a specific host and port pair. Using this, you
1197 can make the curl requests(s) use a specified address and prevent the
1198 otherwise normally resolved address to be used. Consider it a sort of
1199 /etc/hosts alternative provided on the command line. The port number should be
1200 the number used for the specific protocol the host will be used for. It means
1201 you need several entries if you want to provide address for the same host but
1202 different ports.
1203
1204 This option can be used many times to add many host names to resolve.
1205
1206 (Added in 7.21.3)
1207 .IP "--retry <num>"
1208 If a transient error is returned when curl tries to perform a transfer, it
1209 will retry this number of times before giving up. Setting the number to 0
1210 makes curl do no retries (which is the default). Transient error means either:
1211 a timeout, an FTP 4xx response code or an HTTP 5xx response code.
1212
1213 When curl is about to retry a transfer, it will first wait one second and then
1214 for all forthcoming retries it will double the waiting time until it reaches
1215 10 minutes which then will be the delay between the rest of the retries.  By
1216 using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
1217 also \fI--retry-max-time\fP to limit the total time allowed for
1218 retries. (Added in 7.12.3)
1219
1220 If this option is used multiple times, the last occurrence decide the amount.
1221 .IP "--retry-delay <seconds>"
1222 Make curl sleep this amount of time before each retry when a transfer has
1223 failed with a transient error (it changes the default backoff time algorithm
1224 between retries). This option is only interesting if \fI--retry\fP is also
1225 used. Setting this delay to zero will make curl use the default backoff time.
1226 (Added in 7.12.3)
1227
1228 If this option is used multiple times, the last occurrence determines the amount.
1229 .IP "--retry-max-time <seconds>"
1230 The retry timer is reset before the first transfer attempt. Retries will be
1231 done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
1232 given limit. Notice that if the timer hasn't reached the limit, the request
1233 will be made and while performing, it may take longer than this given time
1234 period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
1235 Set this option to zero to not timeout retries. (Added in 7.12.3)
1236
1237 If this option is used multiple times, the last occurrence determines the
1238 amount.
1239 .IP "-s, --silent"
1240 Silent or quiet mode. Don't show progress meter or error messages.  Makes
1241 Curl mute.
1242 .IP "-S, --show-error"
1243 When used with -s it makes curl show an error message if it fails.
1244 .IP "--ssl"
1245 (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a
1246 non-secure connection if the server doesn't support SSL/TLS.  See also
1247 \fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
1248 encryption required. (Added in 7.20.0)
1249
1250 This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
1251 option name can still be used but will be removed in a future version.
1252 .IP "--ssl-reqd"
1253 (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the
1254 connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
1255
1256 This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
1257 option name can still be used but will be removed in a future version.
1258 .IP "--socks4 <host[:port]>"
1259 Use the specified SOCKS4 proxy. If the port number is not specified, it is
1260 assumed at port 1080. (Added in 7.15.2)
1261
1262 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1263 mutually exclusive.
1264
1265 Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
1266 with \fI-x, --proxy\fP using a socks4:// protocol prefix.
1267
1268 If this option is used several times, the last one will be used.
1269 .IP "--socks4a <host[:port]>"
1270 Use the specified SOCKS4a proxy. If the port number is not specified, it is
1271 assumed at port 1080. (Added in 7.18.0)
1272
1273 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1274 mutually exclusive.
1275
1276 Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
1277 with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
1278
1279 If this option is used several times, the last one will be used.
1280 .IP "--socks5-hostname <host[:port]>"
1281 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
1282 the port number is not specified, it is assumed at port 1080. (Added in
1283 7.18.0)
1284
1285 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1286 mutually exclusive.
1287
1288 Since 7.21.7, this option is superfluous since you can specify a socks5
1289 hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
1290
1291 If this option is used several times, the last one will be used. (This option
1292 was previously wrongly documented and used as --socks without the number
1293 appended.)
1294 .IP "--socks5 <host[:port]>"
1295 Use the specified SOCKS5 proxy - but resolve the host name locally. If the
1296 port number is not specified, it is assumed at port 1080.
1297
1298 This option overrides any previous use of \fI-x, --proxy\fP, as they are
1299 mutually exclusive.
1300
1301 Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
1302 with \fI-x, --proxy\fP using a socks5:// protocol prefix.
1303
1304 If this option is used several times, the last one will be used. (This option
1305 was previously wrongly documented and used as --socks without the number
1306 appended.)
1307
1308 This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
1309 .IP "--socks5-gssapi-service <servicename>"
1310 The default service name for a socks server is rcmd/server-fqdn. This option
1311 allows you to change it.
1312
1313 Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
1314 sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
1315 sockd/real-name would use sockd/real-name for cases where the proxy-name does
1316 not match the principal name.  (Added in 7.19.4).
1317 .IP "--socks5-gssapi-nec"
1318 As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
1319 says in section 4.3/4.4 it should be protected, but the NEC reference
1320 implementation does not.  The option \fI--socks5-gssapi-nec\fP allows the
1321 unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
1322 .IP "--stderr <file>"
1323 Redirect all writes to stderr to the specified file instead. If the file name
1324 is a plain '-', it is instead written to stdout. This option has no point when
1325 you're using a shell with decent redirecting capabilities.
1326
1327 If this option is used several times, the last one will be used.
1328 .IP "-t, --telnet-option <OPT=val>"
1329 Pass options to the telnet protocol. Supported options are:
1330
1331 TTYPE=<term> Sets the terminal type.
1332
1333 XDISPLOC=<X display> Sets the X display location.
1334
1335 NEW_ENV=<var,val> Sets an environment variable.
1336 .IP "-T, --upload-file <file>"
1337 This transfers the specified local file to the remote URL. If there is no file
1338 part in the specified URL, Curl will append the local file name. NOTE that you
1339 must use a trailing / on the last directory to really prove to Curl that there
1340 is no file name or curl will think that your last directory name is the remote
1341 file name to use. That will most likely cause the upload operation to fail. If
1342 this is used on a HTTP(S) server, the PUT command will be used.
1343
1344 Use the file name "-" (a single dash) to use stdin instead of a given file.
1345 Alternately, the file name "." (a single period) may be specified instead
1346 of "-" to use stdin in non-blocking mode to allow reading server output
1347 while stdin is being uploaded.
1348
1349 You can specify one -T for each URL on the command line. Each -T + URL pair
1350 specifies what to upload and to where. curl also supports "globbing" of the -T
1351 argument, meaning that you can upload multiple files to a single URL by using
1352 the same URL globbing style supported in the URL, like this:
1353
1354 curl -T "{file1,file2}" http://www.uploadtothissite.com
1355
1356 or even
1357
1358 curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
1359 .IP "--tcp-nodelay"
1360 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
1361 details about this option. (Added in 7.11.2)
1362 .IP "--tftp-blksize <value>"
1363 (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
1364 curl will try to use when transferring data to or from a TFTP server. By
1365 default 512 bytes will be used.
1366
1367 If this option is used several times, the last one will be used.
1368
1369 (Added in 7.20.0)
1370 .IP "--tlsauthtype <authtype>"
1371 Set TLS authentication type. Currently, the only supported option is "SRP",
1372 for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
1373 specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
1374 (Added in 7.21.4)
1375 .IP "--tlsuser <user>"
1376 Set username for use with the TLS authentication method specified with
1377 \fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set.  (Added in
1378 7.21.4)
1379 .IP "--tlspassword <password>"
1380 Set password for use with the TLS authentication method specified with
1381 \fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set.  (Added in
1382 7.21.4)
1383 .IP "--tr-encoding"
1384 (HTTP) Request a compressed Transfer-Encoding response using one of the
1385 algorithms libcurl supports, and uncompress the data while receiving it.
1386
1387 (Added in 7.21.6)
1388 .IP "--trace <file>"
1389 Enables a full trace dump of all incoming and outgoing data, including
1390 descriptive information, to the given output file. Use "-" as filename to have
1391 the output sent to stdout.
1392
1393 This option overrides previous uses of \fI-v, --verbose\fP or
1394 \fI--trace-ascii\fP.
1395
1396 If this option is used several times, the last one will be used.
1397 .IP "--trace-ascii <file>"
1398 Enables a full trace dump of all incoming and outgoing data, including
1399 descriptive information, to the given output file. Use "-" as filename to have
1400 the output sent to stdout.
1401
1402 This is very similar to \fI--trace\fP, but leaves out the hex part and only
1403 shows the ASCII part of the dump. It makes smaller output that might be easier
1404 to read for untrained humans.
1405
1406 This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
1407
1408 If this option is used several times, the last one will be used.
1409 .IP "--trace-time"
1410 Prepends a time stamp to each trace or verbose line that curl displays.
1411 (Added in 7.14.0)
1412 .IP "-u, --user <user:password>"
1413 Specify the user name and password to use for server authentication. Overrides
1414 \fI-n, --netrc\fP and \fI--netrc-optional\fP.
1415
1416 If you just give the user name (without entering a colon) curl will prompt for
1417 a password.
1418
1419 If you use an SSPI-enabled curl binary and do NTLM authentication, you can
1420 force curl to pick up the user name and password from your environment by
1421 simply specifying a single colon with this option: "-u :".
1422
1423 If this option is used several times, the last one will be used.
1424 .IP "-U, --proxy-user <user:password>"
1425 Specify the user name and password to use for proxy authentication.
1426
1427 If you use an SSPI-enabled curl binary and do NTLM authentication, you can
1428 force curl to pick up the user name and password from your environment by
1429 simply specifying a single colon with this option: "-U :".
1430
1431 If this option is used several times, the last one will be used.
1432 .IP "--url <URL>"
1433 Specify a URL to fetch. This option is mostly handy when you want to specify
1434 URL(s) in a config file.
1435
1436 This option may be used any number of times. To control where this URL is
1437 written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
1438 .IP "-v, --verbose"
1439 Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
1440 starting with '>' means "header data" sent by curl, '<' means "header data"
1441 received by curl that is hidden in normal cases, and a line starting with '*'
1442 means additional info provided by curl.
1443
1444 Note that if you only want HTTP headers in the output, \fI-i, --include\fP
1445 might be the option you're looking for.
1446
1447 If you think this option still doesn't give you enough details, consider using
1448 \fI--trace\fP or \fI--trace-ascii\fP instead.
1449
1450 This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
1451
1452 Use \fI-s, --silent\fP to make curl quiet.
1453 .IP "-w, --write-out <format>"
1454 Defines what to display on stdout after a completed and successful
1455 operation. The format is a string that may contain plain text mixed with any
1456 number of variables. The string can be specified as "string", to get read from
1457 a particular file you specify it "@filename" and to tell curl to read the
1458 format from stdin you write "@-".
1459
1460 The variables present in the output format will be substituted by the value or
1461 text that curl thinks fit, as described below. All variables are specified
1462 as %{variable_name} and to output a normal % you just write them as
1463 %%. You can output a newline by using \\n, a carriage return with \\r and a tab
1464 space with \\t.
1465
1466 .B NOTE:
1467 The %-symbol is a special symbol in the win32-environment, where all
1468 occurrences of % must be doubled when using this option.
1469
1470 The variables available at this point are:
1471 .RS
1472 .TP 15
1473 .B url_effective
1474 The URL that was fetched last. This is most meaningful if you've told curl
1475 to follow location: headers.
1476 .TP
1477 .B http_code
1478 The numerical response code that was found in the last retrieved HTTP(S) or
1479 FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
1480 same info.
1481 .TP
1482 .B http_connect
1483 The numerical code that was found in the last response (from a proxy) to a
1484 curl CONNECT request. (Added in 7.12.4)
1485 .TP
1486 .B time_total
1487 The total time, in seconds, that the full operation lasted. The time will be
1488 displayed with millisecond resolution.
1489 .TP
1490 .B time_namelookup
1491 The time, in seconds, it took from the start until the name resolving was
1492 completed.
1493 .TP
1494 .B time_connect
1495 The time, in seconds, it took from the start until the TCP connect to the
1496 remote host (or proxy) was completed.
1497 .TP
1498 .B time_appconnect
1499 The time, in seconds, it took from the start until the SSL/SSH/etc
1500 connect/handshake to the remote host was completed. (Added in 7.19.0)
1501 .TP
1502 .B time_pretransfer
1503 The time, in seconds, it took from the start until the file transfer was just
1504 about to begin. This includes all pre-transfer commands and negotiations that
1505 are specific to the particular protocol(s) involved.
1506 .TP
1507 .B time_redirect
1508 The time, in seconds, it took for all redirection steps include name lookup,
1509 connect, pretransfer and transfer before the final transaction was
1510 started. time_redirect shows the complete execution time for multiple
1511 redirections. (Added in 7.12.3)
1512 .TP
1513 .B time_starttransfer
1514 The time, in seconds, it took from the start until the first byte was just about
1515 to be transferred. This includes time_pretransfer and also the time the
1516 server needed to calculate the result.
1517 .TP
1518 .B size_download
1519 The total amount of bytes that were downloaded.
1520 .TP
1521 .B size_upload
1522 The total amount of bytes that were uploaded.
1523 .TP
1524 .B size_header
1525 The total amount of bytes of the downloaded headers.
1526 .TP
1527 .B size_request
1528 The total amount of bytes that were sent in the HTTP request.
1529 .TP
1530 .B speed_download
1531 The average download speed that curl measured for the complete download. Bytes
1532 per second.
1533 .TP
1534 .B speed_upload
1535 The average upload speed that curl measured for the complete upload. Bytes per
1536 second.
1537 .TP
1538 .B content_type
1539 The Content-Type of the requested document, if there was any.
1540 .TP
1541 .B num_connects
1542 Number of new connects made in the recent transfer. (Added in 7.12.3)
1543 .TP
1544 .B num_redirects
1545 Number of redirects that were followed in the request. (Added in 7.12.3)
1546 .TP
1547 .B redirect_url
1548 When a HTTP request was made without -L to follow redirects, this variable
1549 will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
1550 .TP
1551 .B ftp_entry_path
1552 The initial path libcurl ended up in when logging on to the remote FTP
1553 server. (Added in 7.15.4)
1554 .TP
1555 .B ssl_verify_result
1556 The result of the SSL peer certificate verification that was requested. 0
1557 means the verification was successful. (Added in 7.19.0)
1558 .RE
1559
1560 If this option is used several times, the last one will be used.
1561 .IP "-x, --proxy <[protocol://][user@password]proxyhost[:port]>"
1562 Use the specified HTTP proxy. If the port number is not specified, it is
1563 assumed at port 1080.
1564
1565 This option overrides existing environment variables that set the proxy to
1566 use. If there's an environment variable setting a proxy, you can set proxy to
1567 \&"" to override it.
1568
1569 All operations that are performed over a HTTP proxy will transparently be
1570 converted to HTTP. It means that certain protocol specific operations might
1571 not be available. This is not the case if you can tunnel through the proxy, as
1572 one with the \fI-p, --proxytunnel\fP option.
1573
1574 The proxy host can be specified the exact same way as the proxy environment
1575 variables, including the protocol prefix (http://) and the embedded user +
1576 password.
1577
1578 From 7.21.7, the proxy string may be specified with a protocol:// prefix to
1579 specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
1580 socks5h:// to request the specific SOCKS version to be used. No protocol
1581 specified, http:// and all others will be treated as HTTP proxies.
1582
1583 If this option is used several times, the last one will be used.
1584 .IP "-X, --request <command>"
1585 (HTTP) Specifies a custom request method to use when communicating with the
1586 HTTP server.  The specified request will be used instead of the method
1587 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
1588 details and explanations. Common additional HTTP requests include PUT and
1589 DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
1590 more.
1591
1592 (FTP)
1593 Specifies a custom FTP command to use instead of LIST when doing file lists
1594 with FTP.
1595
1596 If this option is used several times, the last one will be used.
1597 .IP "-y, --speed-time <time>"
1598 If a download is slower than speed-limit bytes per second during a speed-time
1599 period, the download gets aborted. If speed-time is used, the default
1600 speed-limit will be 1 unless set with -Y.
1601
1602 This option controls transfers and thus will not affect slow connects etc. If
1603 this is a concern for you, try the \fI--connect-timeout\fP option.
1604
1605 If this option is used several times, the last one will be used.
1606 .IP "-Y, --speed-limit <speed>"
1607 If a download is slower than this given speed (in bytes per second) for
1608 speed-time seconds it gets aborted. speed-time is set with -y and is 30 if
1609 not set.
1610
1611 If this option is used several times, the last one will be used.
1612 .IP "-z, --time-cond <date expression>"
1613 (HTTP/FTP/FILE) Request a file that has been modified later than the given time
1614 and date, or one that has been modified before that time. The date expression
1615 can be all sorts of date strings or if it doesn't match any internal ones, it
1616 tries to get the time from a given file name instead! See the
1617 \fIcurl_getdate(3)\fP man pages for date expression details.
1618
1619 Start the date expression with a dash (-) to make it request for a document
1620 that is older than the given date/time, default is a document that is newer
1621 than the specified date/time.
1622
1623 If this option is used several times, the last one will be used.
1624 .IP "-h, --help"
1625 Usage help.
1626 .IP "-M, --manual"
1627 Manual. Display the huge help text.
1628 .IP "-V, --version"
1629 Displays information about curl and the libcurl version it uses.
1630
1631 The first line includes the full version of curl, libcurl and other 3rd party
1632 libraries linked with the executable.
1633
1634 The second line (starts with "Protocols:") shows all protocols that libcurl
1635 reports to support.
1636
1637 The third line (starts with "Features:") shows specific features libcurl
1638 reports to offer. Available features include:
1639 .RS
1640 .IP "IPv6"
1641 You can use IPv6 with this.
1642 .IP "krb4"
1643 Krb4 for FTP is supported.
1644 .IP "SSL"
1645 HTTPS and FTPS are supported.
1646 .IP "libz"
1647 Automatic decompression of compressed files over HTTP is supported.
1648 .IP "NTLM"
1649 NTLM authentication is supported.
1650 .IP "GSS-Negotiate"
1651 Negotiate authentication and krb5 for FTP is supported.
1652 .IP "Debug"
1653 This curl uses a libcurl built with Debug. This enables more error-tracking
1654 and memory debugging etc. For curl-developers only!
1655 .IP "AsynchDNS"
1656 This curl uses asynchronous name resolves.
1657 .IP "SPNEGO"
1658 SPNEGO Negotiate authentication is supported.
1659 .IP "Largefile"
1660 This curl supports transfers of large files, files larger than 2GB.
1661 .IP "IDN"
1662 This curl supports IDN - international domain names.
1663 .IP "SSPI"
1664 SSPI is supported. If you use NTLM and set a blank user name, curl will
1665 authenticate with your current user and password.
1666 .IP "TLS-SRP"
1667 SRP (Secure Remote Password) authentication is supported for TLS.
1668 .RE
1669 .SH FILES
1670 .I ~/.curlrc
1671 .RS
1672 Default config file, see \fI-K, --config\fP for details.
1673 .SH ENVIRONMENT
1674 The environment variables can be specified in lower case or upper case. The
1675 lower case version has precedence. http_proxy is an exception as it is only
1676 available in lower case.
1677
1678 Using an environment variable to set the proxy has the same effect as using
1679 the \fI--proxy\fP option.
1680
1681 .IP "http_proxy [protocol://]<host>[:port]"
1682 Sets the proxy server to use for HTTP.
1683 .IP "HTTPS_PROXY [protocol://]<host>[:port]"
1684 Sets the proxy server to use for HTTPS.
1685 .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
1686 Sets the proxy server to use for [url-protocol], where the protocol is a
1687 protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
1688 SMTP, LDAP etc.
1689 .IP "ALL_PROXY [protocol://]<host>[:port]"
1690 Sets the proxy server to use if no protocol-specific proxy is set.
1691 .IP "NO_PROXY <comma-separated list of hosts>"
1692 list of host names that shouldn't go through any proxy. If set to a asterisk
1693 \&'*' only, it matches all hosts.
1694 .SH "PROXY PROTOCOL PREFIXES"
1695 Since curl version 7.21.7, the proxy string may be specified with a
1696 protocol:// prefix to specify alternative proxy protocols.
1697
1698 If no protocol is specified in the proxy string or if the string doesn't match
1699 a supported one, the proxy will be treated as a HTTP proxy.
1700
1701 The supported proxy protocol prefixes are as follows:
1702 .IP "socks4://"
1703 Makes it the equivalent of \fI--socks4\fP
1704 .IP "socks4a://"
1705 Makes it the equivalent of \fI--socks4a\fP
1706 .IP "socks5://"
1707 Makes it the equivalent of \fI--socks5\fP
1708 .IP "socks5h://"
1709 Makes it the equivalent of \fI--socks5-hostname\fP
1710 .SH EXIT CODES
1711 There are a bunch of different error codes and their corresponding error
1712 messages that may appear during bad conditions. At the time of this writing,
1713 the exit codes are:
1714 .IP 1
1715 Unsupported protocol. This build of curl has no support for this protocol.
1716 .IP 2
1717 Failed to initialize.
1718 .IP 3
1719 URL malformed. The syntax was not correct.
1720 .IP 4
1721 A feature or option that was needed to perform the desired request was not
1722 enabled or was explicitly disabled at build-time. To make curl able to do
1723 this, you probably need another build of libcurl!
1724 .IP 5
1725 Couldn't resolve proxy. The given proxy host could not be resolved.
1726 .IP 6
1727 Couldn't resolve host. The given remote host was not resolved.
1728 .IP 7
1729 Failed to connect to host.
1730 .IP 8
1731 FTP weird server reply. The server sent data curl couldn't parse.
1732 .IP 9
1733 FTP access denied. The server denied login or denied access to the particular
1734 resource or directory you wanted to reach. Most often you tried to change to a
1735 directory that doesn't exist on the server.
1736 .IP 11
1737 FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
1738 .IP 13
1739 FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
1740 .IP 14
1741 FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
1742 .IP 15
1743 FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
1744 .IP 17
1745 FTP couldn't set binary. Couldn't change transfer method to binary.
1746 .IP 18
1747 Partial file. Only a part of the file was transferred.
1748 .IP 19
1749 FTP couldn't download/access the given file, the RETR (or similar) command
1750 failed.
1751 .IP 21
1752 FTP quote error. A quote command returned error from the server.
1753 .IP 22
1754 HTTP page not retrieved. The requested url was not found or returned another
1755 error with the HTTP error code being 400 or above. This return code only
1756 appears if \fI-f, --fail\fP is used.
1757 .IP 23
1758 Write error. Curl couldn't write data to a local filesystem or similar.
1759 .IP 25
1760 FTP couldn't STOR file. The server denied the STOR operation, used for FTP
1761 uploading.
1762 .IP 26
1763 Read error. Various reading problems.
1764 .IP 27
1765 Out of memory. A memory allocation request failed.
1766 .IP 28
1767 Operation timeout. The specified time-out period was reached according to the
1768 conditions.
1769 .IP 30
1770 FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
1771 command, try doing a transfer using PASV instead!
1772 .IP 31
1773 FTP couldn't use REST. The REST command failed. This command is used for
1774 resumed FTP transfers.
1775 .IP 33
1776 HTTP range error. The range "command" didn't work.
1777 .IP 34
1778 HTTP post error. Internal post-request generation error.
1779 .IP 35
1780 SSL connect error. The SSL handshaking failed.
1781 .IP 36
1782 FTP bad download resume. Couldn't continue an earlier aborted download.
1783 .IP 37
1784 FILE couldn't read file. Failed to open the file. Permissions?
1785 .IP 38
1786 LDAP cannot bind. LDAP bind operation failed.
1787 .IP 39
1788 LDAP search failed.
1789 .IP 41
1790 Function not found. A required LDAP function was not found.
1791 .IP 42
1792 Aborted by callback. An application told curl to abort the operation.
1793 .IP 43
1794 Internal error. A function was called with a bad parameter.
1795 .IP 45
1796 Interface error. A specified outgoing interface could not be used.
1797 .IP 47
1798 Too many redirects. When following redirects, curl hit the maximum amount.
1799 .IP 48
1800 Unknown option specified to libcurl. This indicates that you passed a weird
1801 option to curl that was passed on to libcurl and rejected. Read up in the
1802 manual!
1803 .IP 49
1804 Malformed telnet option.
1805 .IP 51
1806 The peer's SSL certificate or SSH MD5 fingerprint was not OK.
1807 .IP 52
1808 The server didn't reply anything, which here is considered an error.
1809 .IP 53
1810 SSL crypto engine not found.
1811 .IP 54
1812 Cannot set SSL crypto engine as default.
1813 .IP 55
1814 Failed sending network data.
1815 .IP 56
1816 Failure in receiving network data.
1817 .IP 58
1818 Problem with the local certificate.
1819 .IP 59
1820 Couldn't use specified SSL cipher.
1821 .IP 60
1822 Peer certificate cannot be authenticated with known CA certificates.
1823 .IP 61
1824 Unrecognized transfer encoding.
1825 .IP 62
1826 Invalid LDAP URL.
1827 .IP 63
1828 Maximum file size exceeded.
1829 .IP 64
1830 Requested FTP SSL level failed.
1831 .IP 65
1832 Sending the data requires a rewind that failed.
1833 .IP 66
1834 Failed to initialise SSL Engine.
1835 .IP 67
1836 The user name, password, or similar was not accepted and curl failed to log in.
1837 .IP 68
1838 File not found on TFTP server.
1839 .IP 69
1840 Permission problem on TFTP server.
1841 .IP 70
1842 Out of disk space on TFTP server.
1843 .IP 71
1844 Illegal TFTP operation.
1845 .IP 72
1846 Unknown TFTP transfer ID.
1847 .IP 73
1848 File already exists (TFTP).
1849 .IP 74
1850 No such user (TFTP).
1851 .IP 75
1852 Character conversion failed.
1853 .IP 76
1854 Character conversion functions required.
1855 .IP 77
1856 Problem with reading the SSL CA cert (path? access rights?).
1857 .IP 78
1858 The resource referenced in the URL does not exist.
1859 .IP 79
1860 An unspecified error occurred during the SSH session.
1861 .IP 80
1862 Failed to shut down the SSL connection.
1863 .IP 82
1864 Could not load CRL file, missing or wrong format (added in 7.19.0).
1865 .IP 83
1866 Issuer check failed (added in 7.19.0).
1867 .IP 84
1868 The FTP PRET command failed
1869 .IP 85
1870 RTSP: mismatch of CSeq numbers
1871 .IP 86
1872 RTSP: mismatch of Session Identifiers
1873 .IP 87
1874 unable to parse FTP file list
1875 .IP 88
1876 FTP chunk callback reported error
1877 .IP XX
1878 More error codes will appear here in future releases. The existing ones
1879 are meant to never change.
1880 .SH AUTHORS / CONTRIBUTORS
1881 Daniel Stenberg is the main author, but the whole list of contributors is
1882 found in the separate THANKS file.
1883 .SH WWW
1884 http://curl.haxx.se
1885 .SH FTP
1886 ftp://ftp.sunet.se/pub/www/utilities/curl/
1887 .SH "SEE ALSO"
1888 .BR ftp (1),
1889 .BR wget (1)