~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to docs/curl.html

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
<p class="level1">If this option is used several times, the last one will be used. 
105
105
<p class="level0"><a name="--create-dirs"></a><span class="nroffip">--create-dirs</span> 
106
106
<p class="level1">When used in conjunction with the -o option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it mentions already exist, no dir will be created. 
107
 
<p class="level1">To create remote directories when using FTP or SFTP, try  <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>. 
 
107
<p class="level1">To create remote directories when using FTP or SFTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>. 
108
108
<p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span> 
109
109
<p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). 
110
110
<p class="level0"><a name="--crlfile"></a><span class="nroffip">--crlfile &lt;file&gt;</span> 
203
203
<p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span> 
204
204
<p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2) 
205
205
<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV. 
206
 
<p class="level0"><a name="--ftp-ssl"></a><span class="nroffip">--ftp-ssl</span> 
207
 
<p class="level1">(FTP) Try to use SSL/TLS for the FTP connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ftp-ssl-reqd">--ftp-ssl-reqd</a> for different levels of encryption required. (Added in 7.11.0) 
 
206
<p class="level0"><a name="--ftp-pret"></a><span class="nroffip">--ftp-pret</span> 
 
207
<p class="level1">(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x) 
 
208
<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span> 
 
209
<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0) 
 
210
<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0) and that can still be used but will be removed in a future version. 
208
211
<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span> 
209
212
<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure authentication, but non-encrypted data transfers for efficiency.  Fails the transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0) 
210
 
<p class="level0"><a name="--ftp-ssl-reqd"></a><span class="nroffip">--ftp-ssl-reqd</span> 
211
 
<p class="level1">(FTP) Require SSL/TLS for the FTP connection. Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.15.5) 
 
213
<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span> 
 
214
<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0) 
 
215
<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5) and that can still be used but will be removed in a future version. 
212
216
<p class="level0"><a name="--ftp-ssl-ccc"></a><span class="nroffip">--ftp-ssl-ccc</span> 
213
217
<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See --ftp-ssl-ccc-mode for other modes. (Added in 7.16.1) 
214
218
<p class="level0"><a name="--ftp-ssl-ccc-mode"></a><span class="nroffip">--ftp-ssl-ccc-mode [active/passive]</span> 
255
259
<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only. 
256
260
<p class="level0"><a name="-j--junk-session-cookies"></a><span class="nroffip">-j/--junk-session-cookies</span> 
257
261
<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down. 
 
262
<p class="level0"><a name="-J--remote-header-name"></a><span class="nroffip">-J/--remote-header-name</span> 
 
263
<p class="level1">(HTTP) This option tells the -O/--remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL. 
258
264
<p class="level0"><a name="-k--insecure"></a><span class="nroffip">-k/--insecure</span> 
259
265
<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used. 
260
266
<p class="level1">See this online resource for further details: <span Class="bold"><a href="http://curl.haxx.se/docs/sslcerts.html">http://curl.haxx.se/docs/sslcerts.html</a></span> 
316
322
<p class="level1">When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method. 
317
323
<p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span> 
318
324
<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L--location">-L/--location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication). 
319
 
<p class="level1">
 
325
<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt &lt;address&gt;</span> 
 
326
<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients. 
 
327
<p class="level1">(Added in 7.20.0) 
 
328
<p class="level0"><a name="--mail-from"></a><span class="nroffip">--mail-from &lt;address&gt;</span> 
 
329
<p class="level1">(SMTP) Specify a single address that the given mail should get sent from. 
 
330
<p class="level1">(Added in 7.20.0) 
320
331
<p class="level0"><a name="--max-filesize"></a><span class="nroffip">--max-filesize &lt;bytes&gt;</span> 
321
332
<p class="level1">Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63. 
322
333
<p class="level1"><span Class="bold">NOTE:</span> The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. 
373
384
<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.17.1) 
374
385
<p class="level0"><a name="--post302"></a><span class="nroffip">--post302</span> 
375
386
<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.19.1) 
 
387
<p class="level0"><a name="--proto"></a><span class="nroffip">--proto &lt;protocols&gt;</span> 
 
388
<p class="level1">Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma separated, and are each a protocol name or 'all', optionally prefixed by zero or more modifiers. Available modifiers are: 
 
389
<p class="level2">
 
390
<p class="level2"><a class="bold" href="#">+</a> Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used). 
 
391
<p class="level2"><a class="bold" href="#-">-</a> Deny this protocol, removing it from the list of protocols already permitted. 
 
392
<p class="level2"><a class="bold" href="#">=</a> Permit only this protocol (ignoring the list already permitted), though subject to later modification by subsequent entries in the comma separated list. 
 
393
<p class="level1">
 
394
<p class="level0"><a name=""></a><span class="nroffip"></span> 
 
395
<p class="level1">For example: 
 
396
<p class="level2">
 
397
<p class="level2"><a class="bold" href="#--proto">--proto -ftps</a> uses the default protocols, but disables ftps 
 
398
<p class="level2"><a class="bold" href="#--proto">--proto -all,https,+http</a> only enables http and https 
 
399
<p class="level2"><a class="bold" href="#--proto">--proto =http,https</a> also only enables http and https 
 
400
<p class="level1">
 
401
<p class="level0"><a name=""></a><span class="nroffip"></span> 
 
402
<p class="level1">Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable potentially dangerous protocols, without relying upon support for that protocol being built into curl to avoid an error. 
 
403
<p class="level1">This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option. 
 
404
<p class="level1">(Added in 7.20.2) 
 
405
<p class="level0"><a name="--proto-redir"></a><span class="nroffip">--proto-redir &lt;protocols&gt;</span> 
 
406
<p class="level1">Tells curl to use the listed protocols after a redirect. See --proto for how protocols are represented. 
 
407
<p class="level1">(Added in 7.20.2) 
376
408
<p class="level0"><a name="--proxy-anyauth"></a><span class="nroffip">--proxy-anyauth</span> 
377
409
<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This might cause an extra request/response round-trip. (Added in 7.13.2) 
378
410
<p class="level0"><a name="--proxy-basic"></a><span class="nroffip">--proxy-basic</span> 
455
487
<p class="level0"><a name="-R--remote-time"></a><span class="nroffip">-R/--remote-time</span> 
456
488
<p class="level1">When used, this will make libcurl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp. 
457
489
<p class="level0"><a name="--retry"></a><span class="nroffip">--retry &lt;num&gt;</span> 
458
 
<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 5xx response code or an HTTP 5xx response code. 
 
490
<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code. 
459
491
<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries.  By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3) 
460
492
<p class="level1">If this option is used multiple times, the last occurrence decide the amount. 
461
493
<p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay &lt;seconds&gt;</span> 
484
516
<p class="level1">Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080. 
485
517
<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
486
518
<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.) 
 
519
<p class="level1">This option (as well as <a class="emphasis" href="#--socks4">--socks4</a>) does not work with IPV6, FTPS or LDAP. 
487
520
<p class="level0"><a name="--socks5-gssapi-service"></a><span class="nroffip">--socks5-gssapi-service &lt;servicename&gt;</span> 
488
521
<p class="level1">The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it. 
489
522
<p class="level1">Examples: &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd   would use sockd/proxy-name &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name   would use sockd/real-name for cases where the proxy-name does not match the princpal name. &nbsp;(Added in 7.19.4). 
499
532
<p class="level1">TTYPE=&lt;term&gt; Sets the terminal type. 
500
533
<p class="level1">XDISPLOC=&lt;X display&gt; Sets the X display location. 
501
534
<p class="level1">NEW_ENV=&lt;var,val&gt; Sets an environment variable. 
 
535
<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize &lt;value&gt;</span> 
 
536
<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when tranferring data to or from a TFTP server. By default 512 bytes will be used. 
 
537
<p class="level1">If this option is used several times, the last one will be used. 
 
538
<p class="level1">(Added in 7.20.0) 
502
539
<p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file &lt;file&gt;</span> 
503
540
<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a HTTP(S) server, the PUT command will be used. 
504
541
<p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. Alternately, the file name "." (a single period) may be specified instead of "-" to use stdin in non-blocking mode to allow reading server output while stdin is being uploaded. 
586
623
<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded. 
587
624
<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers. 
588
625
<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request. 
589
 
<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. 
590
 
<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. 
 
626
<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second. 
 
627
<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second. 
591
628
<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any. 
592
629
<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3) 
593
630
<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3)