~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to docs/MANUAL

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-04-29 11:10:29 UTC
  • mfrom: (3.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090429111029-2j5eiyokfw2bw049
Tags: 7.19.4-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop build dependencies: stunnel, libdb4.6-dev, libssh2-1-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.
  - Call automake-1.9 with --add-missing --copy --force
* drop debian/patches/security_CVE-2009-0037.patch 
  - this patch is part of 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
49
49
                scp://shell.example.com/~/personal.txt
50
50
 
 
51
  Get the main page from an IPv6 web server:
 
52
 
 
53
        curl -g "http://[2001:1890:1112:1::20]/"
51
54
 
52
55
DOWNLOAD TO A FILE
53
56
 
86
89
   standards while the recommended "explicit" way is done by using FTP:// and
87
90
   the --ftp-ssl option.
88
91
 
 
92
 SFTP / SCP
 
93
 
 
94
   This is similar to FTP, but you can specify a private key to use instead of
 
95
   a password. Note that the private key may itself be protected by a password
 
96
   that is unrelated to the login password of the remote system.  If you
 
97
   provide a private key file you must also provide a public key file.
 
98
 
89
99
 HTTP
90
100
 
91
101
   Curl also supports user and password in HTTP URLs, thus you can pick a file
126
136
 
127
137
        curl -U user:passwd -x my-proxy:888 http://www.get.this/
128
138
 
 
139
 A comma-separated list of hosts and domains which do not use the proxy can
 
140
 be specified as:
 
141
 
 
142
        curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
 
143
 
 
144
 If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
 
145
 curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
 
146
 
129
147
 curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
130
148
 
131
149
 See also the environment variables Curl support that offer further proxy
154
172
 
155
173
UPLOADING
156
174
 
157
 
 FTP
 
175
 FTP / FTPS / SFTP / SCP
158
176
 
159
 
  Upload all data on stdin to a specified ftp site:
 
177
  Upload all data on stdin to a specified server:
160
178
 
161
179
        curl -T - ftp://ftp.upload.com/myfile
162
180
 
169
187
 
170
188
        curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
171
189
 
172
 
  Upload a local file to get appended to the remote file using ftp:
 
190
  Upload a local file to get appended to the remote file:
173
191
 
174
192
        curl -T localfile -a ftp://ftp.upload.com/remotefile
175
193
 
331
349
 
332
350
        curl -e www.coolsite.com http://www.showme.com/
333
351
 
334
 
  NOTE: The referer field is defined in the HTTP spec to be a full URL.
 
352
  NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.
335
353
 
336
354
USER AGENT
337
355
 
494
512
  can also specify the long options without the dashes to make it more
495
513
  readable. You can separate the options and the parameter with spaces, or
496
514
  with = or :. Comments can be used within the file. If the first letter on a
497
 
  line is a '#'-letter the rest of the line is treated as a comment.
 
515
  line is a '#'-symbol the rest of the line is treated as a comment.
498
516
 
499
 
  If you want the parameter to contain spaces, you must inclose the entire
 
517
  If you want the parameter to contain spaces, you must enclose the entire
500
518
  parameter within double quotes ("). Within those quotes, you specify a
501
519
  quote as \".
502
520
 
564
582
 
565
583
  (I.e with an extra slash in front of the file name.)
566
584
 
 
585
SFTP and SCP and PATH NAMES
 
586
 
 
587
  With sftp: and scp: URLs, the path name given is the absolute name on the
 
588
  server. To access a file relative to the remote user's home directory,
 
589
  prefix the file with /~/ , such as:
 
590
 
 
591
        curl -u $USER sftp://home.example.com/~/.bashrc
 
592
 
567
593
FTP and firewalls
568
594
 
569
595
  The FTP protocol requires one of the involved parties to open a second
570
 
  connction as soon as data is about to get transfered. There are two ways to
 
596
  connection as soon as data is about to get transfered. There are two ways to
571
597
  do this.
572
598
 
573
599
  The default way for curl is to issue the PASV command which causes the
775
801
 
776
802
        NO_PROXY
777
803
 
778
 
  If a tail substring of the domain-path for a host matches one of these
779
 
  strings, transactions with that node will not be proxied.
 
804
  If the host name matches one of these strings, or the host is within the
 
805
  domain of one of these strings, transactions with that node will not be
 
806
  proxied.
780
807
 
781
808
 
782
809
  The usage of the -x/--proxy flag overrides the environment variables.
875
902
  As is mentioned above, you can download multiple files with one command line
876
903
  by simply adding more URLs. If you want those to get saved to a local file
877
904
  instead of just printed to stdout, you need to add one save option for each
878
 
  URL you specify. Note that this also goes for the -O option.
 
905
  URL you specify. Note that this also goes for the -O option (but not
 
906
  --remote-name-all).
879
907
 
880
908
  For example: get two files and use -O for the first and a custom file
881
909
  name for the second:
886
914
 
887
915
    curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
888
916
 
 
917
IPv6
 
918
 
 
919
  curl will connect to a server with IPv6 when a host lookup returns an IPv6
 
920
  address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6
 
921
  options can specify which address to use when both are available. IPv6
 
922
  addresses can also be specified directly in URLs using the syntax:
 
923
 
 
924
    http://[2001:1890:1112:1::20]/overview.html
 
925
 
 
926
  When this style is used, the -g option must be given to stop curl from
 
927
  interpreting the square brackets as special globbing characters.  Link local
 
928
  and site local addresses including a scope identifier, such as fe80::1234%1,
 
929
  may also be used, but the scope portion must be numeric and the percent
 
930
  character must be URL escaped. The previous example in an SFTP URL might
 
931
  look like:
 
932
 
 
933
    sftp://[fe80::1234%251]/
 
934
 
 
935
  IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
 
936
  or --ftp-port options) should not be URL encoded.
 
937
 
 
938
 
889
939
MAILING LISTS
890
940
 
891
941
  For your convenience, we have several open mailing lists to discuss curl,