]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - doc/tclcurl.n
Imported Upstream version 7.22.0+hg20151017
[sven/tclcurl.git] / doc / tclcurl.n
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" Adapted from libcurl docs by fandom@telefonica.net
4 .TH TclCurl 3 "3 October 2011" "TclCurl 7.22.0 "TclCurl Easy Interface"
5 .SH NAME
6 TclCurl: - get  a  URL with FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP,
7 LDAPS, IMAP, IMAPS, POP, POP3, SMTP, SMTPS and gopher syntax.
8
9 .SH SYNOPSIS
10 .BI "curl::init"
11 .sp
12 .IB curlHandle " configure " "?options?"
13 .sp
14 .IB curlHandle " perform"
15 .sp
16 .IB curlHandle " getinfo " curlinfo_option
17 .sp
18 .IB curlhandle " cleanup"
19 .sp
20 .IB curlhandle " reset"
21 .sp
22 .IB curlHandle " duphandle"
23 .sp
24 .IB curlHandle " pause"
25 .sp
26 .IB curlHandle " resume"
27 .sp
28 .BI curl::transfer " ?options?"
29 .sp
30 .BI curl::version
31 .sp
32 .BI "curl::escape " url
33 .sp
34 .BI "curl::unescape " url
35 .sp
36 .BI "curl::curlConfig " option
37 .sp
38 .BI "curl::versioninfo " option
39 .sp
40 .BI "curl::easystrerror " errorCode
41
42 .SH DESCRIPTION
43 The TclCurl extension gives Tcl programmers access to the libcurl
44 library written by \fBDaniel Stenberg\fP, with it you can download urls,
45 upload them and many other neat tricks, for more information check
46 .I http://curl.haxx.se
47 .SH curl::init
48 This procedure must be the first one to call, it returns a
49 .I curlHandle
50 that you need to use to invoke TclCurl procedures. The init calls intializes
51 curl and this call MUST have a corresponding call to
52 .I cleanup
53 when the operation is completed.
54 You should perform all your sequential file transfers using the same
55 curlHandle. This enables TclCurl to use persistent connections when
56 possible.
57 .sp
58 .B RETURN VALUE
59 .sp
60 .I curlHandle
61 to use.
62 .SH curlHandle configure ?options?
63 .sp
64 .B configure
65 is called to set the options for the transfer. Most operations in TclCurl
66 have default actions, and by using the appropriate options you can
67 make them behave differently (as documented). All options are set with
68 the \fIoption\fP followed by a parameter.
69 .sp
70 .B Notes:
71 the options set with this procedure are valid for the
72 forthcoming data transfers that are performed when you invoke
73 .I perform
74 .sp
75 The options are not reset between transfers (except where noted), so if
76 you want subsequent transfers with different options, you must change them
77 between the transfers. You can optionally reset all options back to the internal
78 default with \fBcurlHandle reset\fP.
79 .sp
80 .I "curlHandle"
81 is the return code from the
82 .I "curl::init"
83 call.
84 .sp
85
86 .B OPTIONS
87 .sp
88 .SH Behaviour options
89
90 .TP
91 .B -verbose
92 Set the parameter to 1 to get the library to display a lot of verbose
93 information about its operations. Very useful for libcurl and/or protocol
94 debugging and understanding.
95
96 You hardly ever want this set in production use, you will almost always want
97 this when you debug/report problems. Another neat option for debugging is
98 .B -debugproc
99
100 .TP
101 .B -header
102 A 1 tells the extension to include the headers in the body output. This is
103 only relevant for protocols that actually have headers preceding the data (like HTTP).
104
105 .TP
106 .B -noprogress
107 A 1 tells the extension to turn on the progress meter
108 completely. It will also prevent the \fIprogessproc\fP from getting called.
109
110 .TP
111 .B -nosignal
112 A 1 tells TclCurl not use any functions that install signal
113 handlers or any functions that cause signals to be sent to the process. This
114 option is mainly here to allow multi-threaded unix applications to still
115 set/use all timeout options etc, without risking getting signals.
116
117 If this option is set and libcurl has been built with the standard name resolver,
118 timeouts will not occur while the name resolve takes place. Consider building
119 libcurl with c-ares support to enable asynchronous DNS lookups, which enables
120 nice timeouts for name resolves without signals. 
121
122 Setting \fInosignal\fP to 1 makes libcurl NOT ask the system to ignore
123 SIGPIPE signals, which otherwise are sent by the system when trying to send
124 data to a socket which is closed in the other end. libcurl makes an effort to
125 never cause such SIGPIPEs to trigger, but some operating systems have no way
126 to avoid them and even on those that have there are some corner cases when
127 they may still happen, contrary to our desire. In addition, using
128 \fIntlm_Wb\fP authentication could cause a SIGCHLD signal to be raised.
129
130 .TP
131 .B -wildcard
132 Set this option to 1 if you want to transfer multiple files according to a
133 file name pattern. The pattern can be specified as part of the
134 \fB-url\fP option, using an fnmatch-like pattern (Shell Pattern
135 Matching) in the last part of URL (file name).
136
137 By default, TClCurl uses its internal wildcard matching implementation. You
138 can provide your own matching function by the \fB-fnmatchproc\fP option.
139
140 This feature is only supported by the FTP download for now.
141
142 A brief introduction of its syntax follows:
143 .RS
144 .IP "* - ASTERISK"
145 \&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
146 directory)
147 .RE
148 .RS
149 .IP "? - QUESTION MARK"
150 Question mark matches any (exactly one) character.
151
152 \&ftp://example.com/some/path/\fBphoto?.jpeg\fP
153 .RE
154 .RS
155 .IP "[ - BRACKET EXPRESSION"
156 The left bracket opens a bracket expression. The question mark and asterisk have
157 no special meaning in a bracket expression. Each bracket expression ends by the
158 right bracket and matches exactly one character. Some examples follow:
159
160 \fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
161
162 \fB[abc]\fP - character enumeration
163
164 \fB[^abc]\fP or \fB[!abc]\fP - negation
165
166 \fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
167 \fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
168 \fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
169
170 \fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
171 characters have no special purpose.
172
173 \fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
174
175 Using the rules above, a file name pattern can be constructed:
176
177 \&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
178 .RE
179 .PP
180
181 .SH Callback options
182
183 .TP
184 .B -writeproc
185 Use it to set a Tcl procedure that will be invoked by TclCurl as soon as
186 there is received data that needs to be saved. The procedure will receive
187 a single parameter with the data to be saved.
188
189 NOTE: you will be passed as much data as possible in all invokes, but you
190 cannot possibly make any assumptions. It may be nothing if the file is
191 empty or it may be thousands of bytes.
192
193 .TP
194 .B -file
195 File in which the transfered data will be saved.
196
197 .TP
198 .B -readproc
199 Sets a Tcl procedure to be called by TclCurl as soon as it needs to read
200 data in order to send it to the peer. The procedure has to take one
201 parameter, which will contain the maximun numbers of bytes to read. It
202 should return the actual number of bytes read, or '0' if you want to
203 stop the transfer.
204
205 If you stop the current transfer by returning 0 "pre-maturely" (i.e before
206 the server expected it, like when you've said you will upload N bytes and
207 you upload less than N bytes), you may experience that the server "hangs"
208 waiting for the rest of the data that won't come. 
209
210 Bugs: when doing TFTP uploads, you must return the exact amount of data
211 that the callback wants, or it will be considered the final packet by the
212 server end and the transfer will end there. 
213
214 .TP
215 .B -infile
216 File from which the data will be transfered.
217
218 .TP
219 .B -progressproc
220 Name of the Tcl procedure that will invoked by TclCurl  with a frequent
221 interval during operation (roughly once per second or sooner), no matter if data
222 is being transfered or not.  Unknown/unused
223 argument values passed to the callback will be set to zero (like if you
224 only download data, the upload size will remain 0), the prototype of the
225 procedure must be:
226 .sp
227 .B proc ProgressCallback {dltotal dlnow ultotal ulnow}
228 .sp
229 In order to this option to work you have to set the \fBnoprogress\fP
230 option to '0'. Setting this option to the empty string will restore the
231 original progress function.
232
233 If you transfer data with the multi interface, this procedure will not be
234 called during periods of idleness unless you call the appropriate procedure
235 that performs transfers.
236
237 You can pause and resume a transfer from within this procedure using the
238 \fBpause\fP and \fBresume\fP commands.
239
240 .TP
241 .B -writeheader
242 Pass a the file name to be used to write the header part of the received data to.
243 The headers are guaranteed to be written one-by-one to this file and
244 only complete lines are written. Parsing headers should be easy enough using
245 this.
246
247 See also the \f-headervar\fP option to get the headers into an array.
248
249 .TP
250 .B -debugproc
251 Name of the procedure that will receive the debug data produced by the
252 .B -verbose
253 option, it should match the following prototype:
254 .sp
255 .B debugProc {infoType data}
256 .sp
257 where \fBinfoType\fP specifies what kind of information it is (0 text,
258 1 incoming header, 2 outgoing header, 3 incoming data, 4 outgoing data,
259 5 incoming SSL data, 6 outgoing SSL data).
260
261 .TP
262 .B -chunkbgnproc
263 Name of the procedure that will be called before a file will be transfered by
264 ftp, it should match the following prototype:
265 .sp
266 .B ChunkBgnProc {remains}
267 .sp
268
269 Where remains is the number of files left to be transfered (or skipped)
270
271 This callback makes sense only when using the \fB-wildcard\fP option.
272
273 .TP
274 .B -chunkbgnvar
275 Name of the variable in the global scope that will contain the data of the file about
276 to be transfered. If you don't use this option '::fileData' will be used.
277
278 The available data is: filename, filetype (file, directory, symlink, device block, device char,
279 named pipe, socket, door or error if it couldn't be identified), time, perm, uid, gid, 
280 size, hardlinks and flags.
281
282 .TP
283 .B -chunkendproc
284 Name of the procedure that will be called after a file is transfered (or skipped) 
285 by ftp, it should match the following prototype:
286 .sp
287 .B ChunkEndProc {}
288 .sp
289 It should return '0' if everyhting is fine and '1' if some error occurred.
290
291 .TP
292 .B -fnmatchProc
293 Name of the procedure that will be called instead of the internal wildcard
294 matching function, it should match the following prototype:
295 .sp
296 .B FnMatchProc {pattern string}
297 .sp
298 Returns '0' if it matches, '1' if it doesn't.
299
300 .SH Error Options
301
302 .TP
303 .B -errorbuffer
304 Pass a variable name where TclCurl may store human readable error
305 messages in. This may be more helpful than just the return code from the
306 command.
307
308 .TP
309 .B -stderr
310 Pass a file name as parameter. This is the stream to use internally instead
311 of stderr when reporting errors.
312 .TP
313 .B -failonerror
314 A 1 parameter tells the extension to fail silently if the HTTP code
315 returned is equal or larger than 400. The default action would be to return
316 the page normally, ignoring that code.
317
318 This method is not fail-safe and there are occasions where non-successful response
319 codes will slip through, especially when authentication is involved
320 (response codes 401 and 407). 
321
322 You might get some amounts of headers transferred before this situation is detected,
323 like for when a "100-continue" is received as a response to a POST/PUT and a 401
324 or 407 is received immediately afterwards.
325
326 .SH Network options
327
328 .TP
329 .B -url
330 The actual URL to deal with.
331
332 If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will
333 attempt to guess which protocol to use based on the given host name. If the
334 given protocol of the set URL is not supported, TclCurl will return the
335 \fBunsupported protocol\fP error when you call \fBperform\fP. Use
336 \fBcurl::versioninfo\fP for detailed info on which protocols are supported.
337
338 Starting with version 7.22.0, the fragment part of the URI will not be send as
339 part of the path, which was the case previously.
340
341 \fBNOTE\fP: this is the one option required to be set before \fBperform\fP is called.
342
343 .TP
344 .B -protocols
345 Pass a list in lowecase of protocols to limit what protocols TclCurl may use in the transfer. This
346 allows you to have a TclCurl built to support a wide range of protocols but still limit
347 specific transfers to only be allowed to use a subset of them. 
348
349 Accepted protocols are 'http', 'https', 'ftp', 'ftps', 'scp', 'sftp', 'telnet', 'ldap',
350 \&'ldaps', 'dict', 'file','tftp', 'imap', 'imaps', 'pop', 'pop3', 'smtp', 'smtps', 'gopher'
351 and 'all'.
352
353 .TP
354 .B -redirprotocols
355 Pass a list in lowercase of accepted protocols to limit what protocols TclCurl may use in a transfer
356 that it follows to in a redirect when \fB-followlocation\fP is enabled. This allows you
357 to limit specific transfers to only be allowed to use a subset of protocols in redirections.
358
359 By default TclCurl will allow all protocols except for FILE and SCP. This is a difference
360 compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported.
361
362 .TP
363 .B -proxy
364 If you need to use a http proxy to access the outside world, set the
365 proxy string with this option. To specify port number in this string,
366 append :[port] to the end of the host name. The proxy string may be
367 prefixed with [protocol]:// since any such prefix will be ignored.
368
369 When you tell the extension to use a HTTP proxy, TclCurl will
370 transparently convert operations to HTTP even if you specify a FTP
371 URL etc. This may have an impact on what other features of the library
372 you can use, such as
373 .B quote
374 and similar FTP specifics that will not work unless you tunnel through
375 the HTTP proxy. Such tunneling  is activated with
376 .B proxytunnel
377
378 TclCurl respects the environment variables http_proxy, ftp_proxy,
379 all_proxy etc, if any of those are set. The use of this option does
380 however override any possibly set environment variables.
381
382 Setting the proxy string to "" (an empty string) will explicitly disable
383 the use of a proxy, even if there is an environment variable set for it.
384
385 The proxy host string can be specified the exact same way as the proxy
386 environment variables, include protocol prefix (http://) and embedded
387 user + password.
388
389 Since 7.22.0, the proxy string may be specified with a protocol:// prefix to
390 specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
391 socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving)
392 to request the specific SOCKS version
393 to be used. No protocol specified, http:// and all others will be treated as
394 HTTP proxies.
395
396 .TP
397 .B -proxyport
398 Use this option to set the proxy port to use unless it is specified in
399 the proxy string by \fB-proxy\fP. If not specified, TclCurl will default
400 to using port 1080 for proxies.
401
402 .TP
403 .B -proxytype
404 Pass the type of  the  proxy. Available options are 'http', 'http1.0', 'socks4', 'socks4a',
405 \&'socks5' and 'socks5h', with the HTTP one being the default.
406
407 If you set it to \fIhttp1.0\fP, it will only affect how libcurl speaks to a proxy
408 when CONNECT is used. The HTTP version used for "regular" HTTP requests is instead
409 controled with \fIhttpversion\fP.
410
411 .TP
412 .B -noproxy
413 Pass a string, a comma-separated list of hosts which do not use a proxy, if one
414 is specified. The only wildcard is a single * character, which matches all hosts,
415 and effectively disables the proxy. Each name in this list is matched as either
416 a domain which contains the hostname, or the hostname itself. For example, local.com
417 would match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
418
419 .TP
420 .B -httpproxytunnel
421 Set the parameter to 1 to get the extension to tunnel all non-HTTP
422 operations through the given HTTP proxy. Do note that there is a big
423 difference between using a proxy and tunneling through it. If you don't know what
424 this means, you probably don't want this tunnel option.
425
426 .TP
427 .B -socks5gssapiservice
428 Pass thee name of the service. The default service name for a SOCKS5 server is
429 rcmd/server-fqdn. This option allows you to change it.
430
431 .TP
432 .B -socks5gssapinec
433 Pass a 1 to enable or 0 to disable. As part of the gssapi negotiation a protection
434 mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but
435 the NEC reference implementation does not. If enabled, this option allows the
436 unprotected exchange of the protection mode negotiation.
437
438 .TP
439 .B -interface
440 Pass the interface name to use as outgoing
441 network interface. The name can be an interface name, an IP address or a host
442 name.
443
444 .TP
445 .B -localport
446 This sets the local port number of the socket used for connection. This can
447 be used in combination with \fB-interface\fP and you are recommended to use
448 \fBlocalportrange\fP as well when this is set. Valid port numbers
449 are 1 - 65535.
450
451 .TP
452 .B -localportrange
453 This is the number of attempts TclCurl should do to find a working local port
454 number. It starts with the given \fB-localport\fP and adds
455 one to the number for each retry. Setting this value to 1 or below will make
456 TclCurl do only one try for each port number. Port numbers by nature
457 are a scarce resource that will be busy at times so setting this value to something
458 too low might cause unnecessary connection setup failures.
459
460 .TP
461 .B -dnscachetimeout
462 Pass the timeout in seconds. Name resolves will be kept in memory for this number
463 of seconds. Set to '0' to completely disable caching, or '\-1' to make the
464 cached entries remain forever. By default, TclCurl caches this info for 60 seconds.
465
466 The name resolve functions of various libc implementations don't re-read name
467 server information unless explicitly told so (for example, by calling
468  \fIres_init(3)\fP). This may cause TclCurl to keep using the older server even
469 if DHCP has updated the server info, and this may look like a DNS cache issue.
470
471 .TP
472 .B -dnsuseglobalcache
473 If the value passed is 1, it tells TclCurl to use a global DNS cache that
474 will survive between curl handles creations and deletions. This is not thread-safe
475 as it uses a global varible.
476
477 \fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
478 to using the share interface instead! See \fItclcurl_share\fP.
479
480 .TP
481 .B -buffersize
482 Pass your preferred size for the receive buffer in TclCurl. The main point of this
483 would be that the write callback gets called more often and with smaller chunks.
484 This is just treated as a request, not an order. You cannot be guaranteed to
485 actually get the given size.
486
487 .TP
488 .B -port
489
490 Pass the number specifying what remote port to connect to, instead of the one specified
491 in the URL or the default port for the used protocol.
492
493 .TP
494 .B -tcpnodelay
495
496 Pass a number to specify whether the TCP_NODELAY option should be set or cleared (1 = set, 0 = clear).
497 The option is cleared by default. This will have no effect after the connection has been established.
498
499 Setting this option will disable TCP's Nagle algorithm. The purpose of this algorithm is to try to
500 minimize the number of small packets on the network (where "small packets" means TCP segments less
501 than the Maximum Segment Size (MSS) for the network).
502
503 Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the
504 send. However, in some cases (most notably telnet or rlogin) small segments may need to be sent without
505 delay. This is less efficient than sending larger amounts of data at a time, and can contribute to
506 congestion on the network if overdone.
507
508 .TP
509 .B -addressscope
510 Pass a number specifying the scope_id value to use when connecting to IPv6 link-local or site-local
511 addresses.
512
513 .SH Names and Passwords options
514
515 .TP
516 .B -netrc
517 A 1 parameter tells the extension to scan your
518 .B ~/.netrc
519 file to find user name and password for the remote site you are about to
520 access. Do note that TclCurl does not verify that the file has the correct
521 properties set (as the standard unix ftp client does), and that only machine
522 name, user name and password is taken into account (init macros and similar
523 things are not supported).
524
525 You can set it to the following values:
526 .RS
527 .TP 5
528 .B optional
529 The use of your ~/.netrc file is optional, and information in the URL is to
530 be preferred. The file will be scanned with the host and user name (to find
531 the password only) or with the host only, to find the first user name and
532 password after that machine, which ever information is not specified in
533 the URL.
534
535 Undefined  values  of  the  option  will  have this effect.
536 .TP
537 .B ignored
538 The extension will ignore the file and use only the information in the URL.
539 This is the default.
540 .TP
541 .B required
542 This value tells the library that use of the file is required, to ignore
543 the information in the URL, and to search the file with the host only.
544 .RE
545
546 .TP
547 .B -netrcfile
548 Pass a string containing the full path name to the file you want to use as .netrc
549 file. For the option to work, you have to set the \fBnetrc\fP option to
550 \fBrequired\fP. If this option is omitted, and \fBnetrc\fP is set, TclCurl
551 will attempt to find the a .netrc file in the current user's home directory.
552
553 .TP
554 .B -userpwd
555 Pass a string as parameter, which should be [username]:[password] to use for
556 the connection. Use \fB-httpauth\fP to decide authentication method.
557
558 When using NTLM, you can set domain by prepending it to the user name and
559 separating the domain and name with a forward (/) or backward slash (\\). Like
560 this: "domain/user:password" or "domain\\user:password". Some HTTP servers (on
561 Windows) support this style even for Basic authentication.
562
563 When using HTTP and \fB-followlocation\fP, TclCurl might perform several
564 requests to possibly different hosts. TclCurl will only send this user and
565 password information to hosts using the initial host name (unless
566 \fB-unrestrictedauth\fP is set), so if TclCurl follows locations to other
567 hosts it will not send the user and password to those. This is enforced to
568 prevent accidental information leakage.
569
570 .TP
571 .B -proxyuserpwd
572 Pass a string as parameter, which should be [username]:[password] to use for
573 the connection to the HTTP proxy.
574
575 .TP 
576 .B -username
577 Pass a string with the user name to use for the transfer. It sets the user name
578 to be used in protocol authentication. You should not use this option together
579 with the (older) \fB-userpwd\fP option.
580
581 In order to specify the password to be used in conjunction with the user name
582 use the \fB-password\fP option.
583
584 .TP
585 .B -password
586 Pass a string with the password to use for the transfer.
587
588 It should be used in conjunction with the \fB-username\fP option.
589
590 .TP
591 .B -proxyusername
592 Pass a string with the user name to use for the transfer while connecting to Proxy. 
593
594 It should be used in same way as the \fB-proxyuserpwd\fP is used, except that it
595 allows the username to contain a colon, like in the following example: 
596 "sip:user@example.com". 
597
598 Note the \fB-proxyusername\fP option is an alternative way to set the user name
599 while connecting to Proxy. It doesn't make sense to use them together.
600
601 .TP
602 .B -proxypassword
603 Pass a string with the password to use for the transfer while connecting to Proxy. It
604 is meant to use together with \fB-proxyusername\fP.
605
606 .TP
607 .B -httpauth
608 Set to the authentication method you want, the available ones are:
609 .RS
610 .TP 5
611 .B basic
612 HTTP Basic authentication. This is the default choice, and the only
613 method that is in widespread use and supported virtually everywhere.
614 It sends the user name and password over the network in plain text,
615 easily captured by others.
616
617 .TP
618 .B digest
619 HTTP Digest authentication. Digest authentication is a more secure
620 way to do authentication over public networks than the regular
621 old-fashioned Basic method.
622
623 .TP
624 .B digestie
625 HTTP Digest authentication with an IE flavor. TclCurl will use a special
626 "quirk" that IE is known to have used before version 7 and that some
627 servers require the client to use.
628
629 .TP
630 .B gssnegotiate
631 HTTP GSS-Negotiate authentication. The GSS-Negotiate method, also known as
632 plain "Negotiate",was designed by Microsoft and is used in their web
633 applications. It is primarily meant as a support for Kerberos5 authentication
634 but may be also used along with another authentication methods.
635
636 .TP
637 .B ntlm
638 HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft.
639 It uses a challenge-response and hash concept similar to Digest, to prevent the
640 password from being eavesdropped.
641
642 .TP
643 .B ntlmwb
644 NTLM delegating to winbind helper. Authentication is performed by a separate
645 binary application that is executed when needed. The name of the application is
646 specified at libcurl's compile time but is typically /usr/bin/ntlm_auth.
647
648 Note that libcurl will fork when necessary to run the winbind application and kill
649 it when complete, calling waitpid() to await its exit when done. On POSIX operating
650 systems, killing the process will cause a SIGCHLD signal to be raised
651 (regardless of whether \fB-nosignal\fP is set). This behavior is subject to change
652 in future versions of libcurl. 
653
654 .TP
655 .B any
656 TclCurl will automatically select the one it finds most secure.
657
658 .TP
659 .B anysafe
660 It may use anything but basic, TclCurl will automatically select the
661 one it finds most secure.
662 .RE
663
664 .TP
665 .B -tlsauthtype
666 Use it to tell TclCurl which authentication method(s) you want it to use for TLS authentication.
667 .RS
668 .TP 5
669 .TP
670 .B tlsauthsrp
671 TLS-SRP authentication. Secure Remote Password authentication for TLS is
672 defined in RFC 5054 and provides mutual authentication if both sides have a
673 shared secret. To use TLS-SRP, you must also set the
674 \fB-tlsauthusername\fP and \fB-tlsauthpassword\fP options.
675
676 You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
677 to work.
678 .RE
679
680 .TP
681 .B -tlsauthusername
682 Pass a string with the username to use for the TLS authentication method specified
683 with the \fB-tlsauthtype\fP option. Requires that the \fB-tlsauthpassword\fP option
684 also be set. 
685
686 .TP
687 .B -tlsauthpassword
688 Pass a string with the password to use for the TLS authentication method specified
689 with the \fB-tlsauthtype\fP option. Requires that the \fB-tlsauthusername\fP option
690 also be set. 
691
692 .TP
693 .B -proxyauth
694 Use it to tell TclCurl which authentication method(s) you want it to use for
695 your proxy authentication. Note that for some methods, this will induce an
696 extra network round-trip. Set the actual name and password with the 
697 \fBproxyuserpwd\fP option.
698
699 The methods are those listed above for the \fBhttpauth\fP option. As of this
700 writing, only Basic and NTLM work.
701
702 .SH HTTP options
703
704 .TP
705 .B -autoreferer
706 Pass an 1 parameter to enable this. When enabled, TclCurl will
707 automatically set the Referer: field in requests where it follows a Location:
708 redirect.
709
710 .TP
711 .B -encoding
712 Sets the contents of the Accept-Encoding: header sent in an HTTP
713 request, and enables decoding of a response when a Content-Encoding:
714 header is received.  Three encodings are supported: \fIidentity\fP,
715 which does nothing, \fIdeflate\fP which requests the server to
716 compress its response using the zlib algorithm, and \fIgzip\fP which
717 requests the gzip algorithm.  Use \fIall\fP to send an
718 Accept-Encoding: header containing all supported encodings.
719
720 This is a request, not an order; the server may or may not do it.  This
721 option must be set or else any unsolicited
722 encoding done by the server is ignored. See the special file
723 lib/README.encoding in libcurl docs for details.
724
725 .TP
726 .B -transferencoding
727 Adds a request for compressed Transfer Encoding in the outgoing HTTP
728 request. If the server supports this and so desires, it can respond with the
729 HTTP resonse sent using a compressed Transfer-Encoding that will be
730 automatically uncompressed by TclCurl on receival.
731
732 Transfer-Encoding differs slightly from the Content-Encoding you ask for with
733 \fB-encoding\fP in that a Transfer-Encoding is strictly meant to
734 be for the transfer and thus MUST be decoded before the data arrives in the
735 client. Traditionally, Transfer-Encoding has been much less used and supported
736 by both HTTP clients and HTTP servers.
737
738 .TP
739 .B -followlocation
740 An 1 tells the library to follow any
741 .B Location: header
742 that the server sends as part of a HTTP header.
743
744 This means that the extension will re-send the  same request on the new location
745 and follow new \fBLocation: headers\fP all the way until no more such headers are
746 returned. \fB-maxredirs\fP can be used to limit the number of redirects
747 TclCurl will follow.
748
749 Since 7.19.4, TclCurl can limit what protocols it will automatically follow.
750 The accepted protocols are set with \fB-redirprotocols\fP and it excludes the FILE
751 protocol by default.
752
753 .TP
754 .B -unrestrictedauth
755 An 1 parameter tells the extension it can continue
756 to  send authentication (user+password) when following
757 locations, even when hostname changed. Note that  this
758 is  meaningful  only  when setting \fB-followlocation\fP.
759
760 .TP
761 .B -maxredirs
762 Sets the redirection limit. If that many redirections have been followed,
763 the next redirect will cause an error. This option only makes sense if the
764 \fB-followlocation\fP option is used at the same time. Setting the limit
765 to 0 will make libcurl refuse any redirect. Set it to \-1 for an infinite
766 number of redirects (which is the default)
767
768 .TP
769 .B -post301
770 Controls how TclCurl acts on redirects after POSTs that get a 301 or 302 response back.
771 A "301" as parameter tells the TclCurl to respect RFC 2616/10.3.2 and not convert POST
772 requests into GET requests when following a 301 redirection. Passing a "302" makes
773 TclCurl maintain the request method after a 302 redirect. "all" is a convenience string
774 that activates both behaviours.
775
776 The non-RFC behaviour is ubiquitous in web browsers, so the extension does the conversion
777 by default to maintain consistency. However, a server may require a POST to remain a POST
778 after such a redirection.
779
780 This option is meaningful only when setting \fB-followlocation\fP
781
782 The option used to be known as \fB-post301\fP, which should still work but is know
783 deprecated.
784
785 .TP
786 .B -put
787 An 1 parameter tells the extension to use HTTP PUT a file. The file to put
788 must be set with \fB-infile\fP and \fB-infilesize\fP.
789
790 This option is deprecated starting with version 0.12.1, you should use \fB-upload\fP.
791
792 This option does not limit how much data TclCurl will actually send, as that is
793 controlled entirely by what the read callback returns. 
794
795 .TP
796 .B -post
797 An 1 parameter tells the library to do a regular HTTP post. This is a
798 normal application/x-www-form-urlencoded kind, which is the most commonly used
799 one by HTML forms. See the \fB-postfields\fP option for how to specify the
800 data to post and \fB-postfieldsize\fP about how to set the data size.
801
802 Use the \fB-postfields\fP option to specify what data to post and \fB-postfieldsize\fP
803 to set the data size. Optionally, you can provide data to POST using the \fB-readproc\fP
804 options.
805
806 You can override the default POST Content-Type: header by setting your own with
807 \fB-httpheader\fP.
808
809 Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
810 You can disable this header with \fB-httpheader\fP as usual.
811
812 If you use POST to a HTTP 1.1 server, you can send data without knowing the
813 size before starting the POST if you use chunked encoding. You enable this
814 by adding a header like "Transfer-Encoding: chunked" with \fB-httpheader\fP.
815 With HTTP 1.0 or without chunked transfer, you must specify the size in the
816 request.
817
818 When setting \fBpost\fP to an 1 value, it will automatically set
819 \fBnobody\fP to 0.
820
821 NOTE: if you have issued a POST request and want to make a HEAD or GET instead, you must
822 explicitly pick the new request type using \fB-nobody\fP or \fB-httpget\fP or similar.
823
824 .TP
825 .B -postfields
826 Pass a string as parameter, which should be the full data to post in a HTTP
827 POST operation. You must make sure that the data is formatted the way you
828 want the server to receive it. TclCurl will not convert or encode it for you.
829 Most web servers will assume this data to be url-encoded.
830
831 This is a normal application/x-www-form-urlencoded  kind,
832 which is the most commonly used one by HTML forms.
833
834 If you want to do a zero-byte POST, you need to set
835 \fB-postfieldsize\fP explicitly to zero, as simply setting
836 \fB-postfields\fP to NULL or "" just effectively disables the sending
837 of the specified string. TclCurl will instead assume that the POST
838 data will be send using the read callback!
839
840 Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
841 You can disable this header with \fB-httpheader\fP as usual.
842
843 \fBNote\fP: to make multipart/formdata posts (aka rfc1867-posts), check out
844 \fB-httppost\fP option.
845
846 .TP
847 .B -postfieldsize
848 If you want to post data to the server without letting TclCurl do a strlen()
849 to measure the data size, this option must be used. Also, when this option is
850 used, you can post fully binary data which otherwise is likely to fail. If
851 this size is set to zero, the library will use strlen() to get the data
852 size.
853
854 .TP
855 .B -httppost
856 Tells TclCurl you want a multipart/formdata HTTP POST to be made and you
857 instruct what data to pass on to the server through a
858 .B Tcl list.
859
860 \fBThis is the only case where the data is reset after a transfer.\fP
861
862 First, there are some basics you need to understand about multipart/formdata
863 posts. Each part consists of at least a \fBNAME\fP and a \fBCONTENTS\fP part. If the part
864 is made for file upload, there are also a stored \fBCONTENT-TYPE\fP and a
865 \fBFILENAME\fP. Below, we'll discuss on what options you use to set these
866 properties in the parts you want to add to your post.
867
868 The list must contain a \fB'name'\fP tag with the name of the section followed
869 by a string with the name, there are three tags to indicate the value of
870 the section: \fB'value'\fP followed by a string with the data to post, \fB'file'\fP
871 followed by the name of the file to post and \fB'contenttype'\fP with the
872 type of the data (text/plain, image/jpg, ...), you can also indicate a \fIfalse\fP
873 file name with \fB'filename'\fP, this is useful in case the server checks if the given
874 file name is valid, for example, by testing if it starts with 'c:\\' as any real file
875 name does or if you want to include the full path of the file to post. You can also post
876 the content of a variable as if it were a file with the options \fB'bufferName'\fP and
877 \fB'buffer'\fP or use \fB'filecontent'\fP followed by a file name to read that file and
878 use the contents as data.
879
880 Should you need to specify extra headers for the form POST section, use
881 \fB'contentheader\fP' followed by a list with the headers to post.
882
883 Please see 'httpPost.tcl' and 'httpBufferPost.tcl' for examples.
884
885 If TclCurl can't set the data to post an error will be returned:
886 .RS
887 .TP 5
888 .B 1
889 If the memory allocation fails.
890 .TP
891 .B 2
892 If one option is given twice for one form.
893 .TP
894 .B 3
895 If an empty string was given.
896 .TP
897 .B 4
898 If an unknown option was used.
899 .TP
900 .B 5
901 If the some form info is not complete (or error)
902 .TP
903 .B 6
904 If an illegal option is used in an array.
905 .TP
906 .B 7
907 TclCurl has no http support.
908 .RE
909
910 .TP
911 .B -referer
912 Pass a string as parameter. It will be used to set the
913 .B referer
914 header in the http request sent to the remote server. This can be used to
915 fool servers or scripts. You can also set any custom header with
916 .B -httpheader.
917
918 .TP
919 .B -useragent
920 Pass a string as parameter. It will be used to set the
921 .B user-agent:
922 header in the http request sent to the remote server. This can be used to fool
923 servers or scripts. You can also set any custom header with
924 .B -httpheader.
925
926 .TP
927 .B -httpheader
928 Pass a
929 .B list
930 with the HTTP headers to pass to the server in your request.
931 If you add a header that is otherwise generated
932 and used by TclCurl internally, your added one will be used instead. If you
933 add a header with no contents as in 'Accept:', the internally used header will
934 just get disabled. Thus, using this option you can add new headers, replace
935 and remove internal headers.
936
937 The headers included in the linked list must not be CRLF-terminated, because
938 TclCurl adds CRLF after each header item. Failure to comply with this will
939 result in strange bugs because the server will most likely ignore part of the
940 headers you specified.
941
942 The first line in a request (containing the method, usually a GET or POST) is
943 not a header and cannot be replaced using this option. Only the lines
944 following the request-line are headers. Adding this method line in this list
945 of headers will only cause your request to send an invalid header.
946
947 \fBNOTE\fP:The most commonly replaced headers have "shortcuts" in the  options:
948 .B cookie, useragent,
949 and
950 .B referer.
951
952 .TP
953 .B -http200aliases
954 Pass a list of aliases to be treated as valid HTTP 200 responses. Some servers
955 respond with a custom header response line. For example, IceCast servers respond
956 with "ICY 200 OK". By including this string in your list of aliases, the
957 response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK".
958
959 \fBNOTE\fP:The alias itself is not parsed for any version strings. Before version
960 7.16.3, TclCurl used the value set by option \fBhttpversion\fP, but starting with
961 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
962
963 .TP
964 .B -cookie
965 Pass a string as parameter.
966 It will be used to set a cookie in the http request. The format of
967 the string should be '[NAME]=[CONTENTS];'. Where NAME is the cookie
968 name and  CONTENTS is what the cookie should contain.
969
970 If  you  need  to  set mulitple cookies, you need to set them all using
971 a single option and thus you need to concatenate them all in one single string.
972 Set multiple cookies in one string like this: "name1=content1; name2=content2;"
973 etc.
974
975 This option sets the cookie header explicitly in the outgoing request(s).
976 If multiple requests are done due to authentication, followed redirections or similar,
977 they will all get this cookie passed on.
978
979 Using this option multiple times will only make the latest string override
980 the previous ones.
981
982 .TP
983 .B -cookiefile
984 Pass a string as parameter. It should contain the name of your file holding
985 cookie data. The cookie data may be in netscape cookie data format or just
986 regular HTTP-style headers dumped to a file.
987
988 Given an empty or non-existing file, this option will enable cookies for this
989 curl handle, making it understand and parse received cookies and then use
990 matching cookies in future requests.
991
992 If you use this option multiple times, you add more files to read.
993
994 .TP
995 .B -cookiejar
996 Pass a file name in which TclCurl will dump all internally known cookies
997 when
998 .B curlHandle cleanup
999 is called. If no cookies are known, no file will be created.
1000 Specify "-" to have the cookies written to stdout.
1001
1002 Using this option also enables cookies for this session, so if you, for
1003 example, follow a location it will make matching cookies get sent accordingly.
1004
1005 TclCurl will not and cannot report an error for  this. Using  '\fBverbose\fP'
1006 will get a warning to display, but that is the only visible feedback you get
1007 about this possibly lethal situation.
1008
1009 .TP
1010 .B -cookiesession
1011 Pass an 1 to mark this as a new cookie "session". It will
1012 force TclCurl to ignore all cookies it is about to load that are "session
1013 cookies" from the previous session. By default, TclCurl always stores and
1014 loads all cookies, independent of whether they are session cookies are not.
1015 Session cookies are cookies without expiry date and they are meant to be
1016 alive and existing for this "session" only.
1017
1018 .TP
1019 .B -cookielist
1020 Pass a string with a cookie. The cookie can be either in Netscape / Mozilla
1021 format or just regular HTTP-style header (Set-Cookie: ...) format. If the
1022 cookie engine was not enabled it will be enabled.  Passing a
1023 magic string "ALL" will erase all known cookies while "FLUSH" will write
1024 all cookies known by TclCurl to the file specified by \fB-cookiejar\fP.
1025
1026 .TP
1027 .B -httpget
1028 If set to 1 forces the HTTP request to get back to GET, usable if
1029 POST, PUT or a custom request have been used previously with the
1030 same handle.
1031
1032 When setting \fBhttpget\fP to 1, \fBnobody\fP will automatically be set to 0.
1033
1034 .TP
1035 .B -httpversion
1036 Set to one of the values decribed below, they force TclCurl to use the
1037 specific http versions. It should only be used if you really MUST do
1038 that because of a silly remote server.
1039 .RS
1040 .TP 5
1041 .B none
1042 We do not care about what version the library uses. TclCurl will use whatever
1043 it thinks fit.
1044 .TP
1045 .B 1.0
1046 Enforce HTTP 1.0 requests.
1047 .TP
1048 .B 1.1
1049 Enforce HTTP 1.1 requests.
1050 .RE
1051
1052 .TP
1053 .B -ignorecontentlength
1054 Ignore the Content-Length header. This is useful for Apache 1.x (and similar
1055 servers) which will report incorrect content length for files over 2
1056 gigabytes. If this option is used, TclCurl will not be able to accurately
1057 report progress, and will simply stop the download when the server ends the
1058 connection.
1059
1060 .TP
1061 .B -httpcontentdecoding
1062 Set to zero to disable content decoding. If set to 1 it is enabled. Note however
1063 that TclCurl has no default content decoding but requires you to use \fBencoding\fP for that.
1064
1065 .TP
1066 .B -httptransferencoding
1067 Set to zero to disable transfer decoding, if set to 1 it is enabled (default). TclCurl does
1068 chunked transfer decoding by default unless this option is set to zero.
1069
1070 .SH SMTP options
1071
1072 .TP 
1073 .B -mailfrom
1074 Pass a string to specify the sender address in a mail when sending an SMTP mail with TclCurl.
1075
1076 .TP
1077 .B -mailrcpt
1078 Pass a list of recipients to pass to the server in your SMTP mail request.
1079
1080 Each recipient in SMTP lingo is specified with angle brackets (<>), but should you not use an
1081 angle bracket as first letter, TclCurl will assume you provide a single email address only and
1082 enclose that with angle brackets for you.
1083
1084 .SH TFTP option
1085
1086 .TP
1087 .B tftpblksize
1088
1089 Specify the block size to use for TFTP data transmission. Valid range as per RFC 2348 is 8-65464 bytes.
1090 The default of 512 bytes will be used if this option is not specified. The specified block size will
1091 only be used pending support by the remote server. If the server does not return an option acknowledgement
1092 or returns an option acknowledgement with no blksize, the default of 512 bytes will be used.
1093
1094 .SH FTP options
1095
1096 .TP
1097 .B -ftpport
1098 Pass a string as parameter. It will be used to
1099 get the IP address to use for the ftp PORT instruction. The PORT instruction
1100 tells the remote server to connect to our specified IP address. The string may
1101 be a plain IP address, a host name, a network interface name (under unix) or
1102 just a '-' to let the library use your systems default IP address. Default FTP
1103 operations are passive, and thus will not use PORT.
1104
1105 The address can be followed by a ':' to specify a port, optionally followed by a '-'
1106 o specify a port range. If the port specified is 0, the operating system will pick
1107 a free port. If a range is provided and all ports in the range are not available,
1108 libcurl will report CURLE_FTP_PORT_FAILED for the handle. Invalid port/range settings
1109 are ignored. IPv6 addresses followed by a port or portrange have to be in brackets.
1110 IPv6 addresses without port/range specifier can be in brackets.
1111
1112 Examples with specified ports:
1113
1114   eth0:0   192.168.1.2:32000-33000   curl.se:32123   [::1]:1234-4567
1115
1116 You disable PORT again and go back to using the passive version by setting this option to
1117 an empty string.
1118
1119 .TP
1120 .B -quote
1121 Pass a \fBlist\fP list with the FTP or SFTP commands to pass to the server prior to your
1122 ftp request. This will be done before any other FTP commands are issued (even
1123 before the CWD command).If you do not want to transfer any files, set
1124 \fBnobody\fP to '1' and \fBheader\fP to '0'.
1125
1126 Prefix the command with an asterisk (*) to make TclCurl continue even if the command
1127 fails as by default TclCurl will stop.
1128
1129 Disable this operation again by setting an empty string to this option.
1130
1131 Keep in mind the commands to send must be 'raw' ftp commands, for example, to
1132 create a directory you need to send \fBmkd Test\fP, not \fBmkdir Test\fP.
1133
1134 Valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm,
1135 rmdir and symlink. 
1136
1137 .TP
1138 .B -postquote
1139 Pass a \fBlist\fP with the FTP commands to pass to the server after your
1140 ftp transfer request. If you do not want to transfer any files, set
1141 \fBnobody\fP to '1' and \fBheader\fP to '0'.
1142
1143 .TP
1144 .B -prequote
1145 Pass a \fBlist\fP of FTP or SFTP commands to pass to the server after the
1146 transfer type is set.
1147
1148 .TP
1149 .B -dirlistonly
1150 A 1 tells the library to just list the names of files in a
1151 directory, instead of doing a full directory listing that would include file
1152 sizes, dates etc. It works with both FTP and SFTP urls.
1153
1154 This causes an FTP NLST command to be sent. Beware that some FTP servers list
1155 only files in their response to NLST, they might not include subdirectories
1156 and symbolic links.
1157
1158 Setting this option to 1 also implies a directory listing even if the URL
1159 doesn't end with a slash, which otherwise is necessary.
1160
1161 Do NOT use this option if you also use \fB-wildcardmatch\fP as it will
1162 effectively break that feature.
1163
1164 .TP
1165 .B -append
1166 A 1 parameter tells the extension to append to the remote file instead of
1167 overwriting it. This is only useful when uploading to a ftp site.
1168
1169 .TP
1170 .B -ftpusepret
1171 Set to 1 to tell TclCurl to use the EPRT (and LPRT) command when doing
1172 active FTP downloads (which is enabled by '\fBftpport\fP'). Using EPRT means
1173 that it will first attempt to use EPRT and then LPRT before using PORT, if
1174 you pass zero to this option, it will not try using EPRT or LPRT, only plain PORT.
1175
1176 .TP
1177 .B -ftpuseepvs
1178 Set to one to tell TclCurl to use the EPSV command when doing passive FTP
1179 downloads (which it always does by default). Using EPSV means that it will
1180 first attempt to use EPSV before using PASV, but if you pass a zero to this
1181 option, it will not try using EPSV, only plain PASV.
1182
1183 .TP
1184 .B -ftpusepret
1185
1186 Set to one to tell TclCurl to send a PRET command before PASV (and EPSV). Certain
1187 FTP servers, mainly drftpd, require this non-standard command for directory listings
1188 as well as up and downloads in PASV mode. Has no effect when using the active FTP
1189 transfers mode.
1190
1191 .TP
1192 .B -ftpcreatemissingdirs
1193 If set to 1, TclCurl will attempt to create any remote directory that it
1194 fails to CWD into. CWD is the command that changes working directory.
1195
1196 This setting also applies to SFTP-connections. TclCurl will attempt to create
1197 the remote directory if it can't obtain a handle to the target-location. The
1198 creation will fail if a file of the same name as the directory to create
1199 already exists or lack of permissions prevents creation.
1200
1201 If set to 2, TclCurl will retry the CWD command again if the subsequent MKD
1202 command fails. This is especially useful if you're doing many simultanoeus
1203 connections against the same server and they all have this option enabled,
1204 as then CWD may first fail but then another connection does MKD before this
1205 connection and thus MKD fails but trying CWD works
1206
1207 .TP
1208 .B -ftpresponsetimeout
1209 Causes TclCurl to set a timeout period (in seconds) on the amount of time that
1210 the server is allowed to take in order to generate a response message for a
1211 command before the session is considered hung. Note that while TclCurl is waiting
1212 for a response, this value overrides \fBtimeout\fP. It is recommended that if used
1213 in conjunction with \fBtimeout\fP, you set it to a value smaller than \fBtimeout\fP.
1214
1215 .TP
1216 .B -ftpalternativetouser 
1217 Pass a string which will be used to authenticate if the usual FTP "USER user" and
1218 "PASS password" negotiation fails. This is currently only known to be required when
1219 connecting to Tumbleweed's Secure Transport FTPS server using client certificates for
1220 authentication.
1221
1222 .TP
1223 .B -ftpskippasvip
1224 If set to 1, it instructs TclCurl not to use the IP address the
1225 server suggests in its 227-response to TclCurl's PASV command when TclCurl
1226 connects the data connection. Instead TclCurl will re-use the same IP address
1227 it already uses for the control connection. But it will use the port number
1228 from the 227-response.
1229
1230 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
1231
1232 .TP
1233 .B -ftpsslauth
1234
1235 Pass TclCurl one of the values from below, to alter how TclCurl issues
1236 "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see \fB-ftpssl\fP).
1237
1238 You may need this option because of servers like BSDFTPD-SSL from
1239 http://bsdftpd-ssl.sc.ru/ "which won't work properly  when "AUTH SSL" is issued
1240 (although the server responds fine and everything) but requires "AUTH TLS"
1241 instead.
1242
1243 .RS
1244 .TP 5
1245 .B default
1246 Allows TclCurl to decide.
1247 .TP
1248 .B ssl
1249 Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
1250 .TP
1251 .B tls
1252 Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
1253 .RE
1254
1255 .TP
1256 .B -ftpsslccc 
1257 Set it to make TclCurl use CCC (Clear Command Channel). It shuts down the
1258 SSL/TLS layer after authenticating. The rest of the control channel
1259 communication will be unencrypted. This allows NAT routers to follow the
1260 FTP transaction. Possible values are:
1261
1262 .RS
1263 .TP 5
1264 .B none
1265 Do not attempt to use CCC.
1266 .TP
1267 .B passive
1268 Do not initiate the shutdown, wait for the server to do it. Do not send a reply. 
1269 .TP
1270 .B active
1271 Initiate the shutdown and wait for a reply. 
1272 .RE
1273
1274 .TP
1275 .B -ftpaccount
1276 Pass string (or "" to disable). When an FTP server asks for "account data" after
1277 user name and password has been provided, this data is sent off using the ACCT
1278 command.
1279
1280 .TP
1281 .B -ftpfilemethod
1282 It allows three values:
1283 .RS
1284 .TP 5
1285 .B multicwd
1286 The default, TclCurl will do a single CWD operation for each path part in the given
1287 URL. For deep hierarchies this means very many commands. This is how RFC1738 says it
1288 should be done.
1289 .TP
1290 .B nocwd
1291 No CWD at all is done, TclCurl will do SIZE, RETR, STOR, etc and give a full path to
1292 the server.
1293 .TP
1294 .B singlecwd
1295 Make one CWD with the full target directory and then operate on the file "normally".
1296 This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
1297 .RE
1298
1299 .SH Protocol options
1300
1301 .TP
1302 .B -transfertext
1303 A 1 tells the extension to use ASCII mode for ftp transfers,
1304 instead of the default binary transfer. For win32 systems it does not set the
1305 stdout to binary mode. This option can be usable when transferring text data
1306 between systems with different views on certain characters, such as newlines
1307 or similar.
1308
1309 \fBNOTE:\fP TclCurl does not do a complete ASCII conversion when doing ASCII
1310 transfers over FTP. This is a known limitation/flaw that nobody has
1311 rectified. TclCurl simply sets the mode to ascii and performs a standard
1312 transfer.
1313
1314 .TP
1315 .B -proxytransfermode
1316 If set to 1, TclCurl sets the transfer mode (binary or ASCII) for FTP transfers
1317 done via an HTTP proxy, by appending ;type=a or ;type=i to the URL.
1318 Without this setting, or it being set to 0, the default, \fB-transfertext\fP has
1319 no effect when doing FTP via a proxy. Beware that not all proxies support this feature.
1320
1321 .TP
1322 .B -crlf
1323 If set to '1', TclCurl converts Unix newlines to CRLF newlines on transfers. Disable
1324 this option again by setting the value to '0'.
1325
1326 .TP
1327 .B -range
1328 Pass a string as parameter, which should contain the specified range you
1329 want. It should be in the format
1330 .I "X-Y"
1331 , where X or Y may be left out. HTTP
1332 transfers also support several intervals, separated with commas as in
1333 .I "X-Y,N-M"
1334 Using this kind of multiple intervals will cause the HTTP server to send the
1335 response document in pieces (using standard MIME separation techniques).
1336
1337 Ranges only work on HTTP, FTP and FILE transfers.
1338
1339 .TP
1340 .B -resumefrom
1341 Pass the offset in number of bytes that you want the transfer to start from.
1342 Set this option to 0 to make the transfer start from the beginning
1343 (effectively disabling resume).
1344
1345 For FTP, set this option to \-1 to make the transfer start from the end of the
1346 target file (useful to continue an interrupted upload). 
1347
1348 When doing uploads with FTP, the resume position is where in the local/source
1349 file TclCurl should try to resume the upload from and it will then append the
1350 source file to the remote target file.
1351
1352 .TP
1353 .B -customrequest
1354 Pass a string as parameter. It will be used instead of GET or HEAD when doing
1355 the HTTP request. This is useful for doing DELETE or other more obscure HTTP
1356 requests. Do not do this at will, make sure your server supports the command first.
1357
1358 Note that TclCurl will still act and assume the keyword it would use if you
1359 do not set your custom and it will act according to that. Thus, changing this
1360 to a HEAD when TclCurl otherwise would do a GET might cause TclCurl to act funny,
1361 and similar. To switch to a proper HEAD, use \fB-nobody\fP, to switch to a proper
1362 POST, use \fB-post\fP or \fB-postfields\fP and so on.
1363
1364 .TP
1365 .B -filetime
1366 If you pass a 1, TclCurl will attempt to get the
1367 modification date of the remote document in this operation. This requires that
1368 the remote server sends the time or replies to a time querying command. The
1369 getinfo procedure with the
1370 .I filetime
1371 argument can be used after a transfer to extract the received time (if any).
1372
1373 .TP
1374 .B -nobody
1375 A 1 tells the library not to include the body-part in the
1376 output. This is only relevant for protocols that have a separate header and
1377 body part. On HTTP(S) servers, this will make TclCurl do a HEAD request.
1378
1379 To change request to GET, you should use \fBhttpget\fP. Change request
1380 to POST with \fBpost\fP etc.
1381
1382 .TP
1383 .B -infilesize
1384 When uploading a file to a remote site, this option should be used to tell
1385 TclCurl what the expected size of the infile is.
1386
1387 This option is mandatory for uploading using SCP.
1388
1389 .TP
1390 .B -upload
1391 A 1 tells the library to prepare for an upload. The
1392 \fB-infile\fP and \fB-infilesize\fP options are also interesting for uploads.
1393 If the protocol is HTTP, uploading means using the PUT request unless you tell
1394 TclCurl otherwise.
1395
1396 Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
1397 You can disable this header with \fB-httpheader\fP as usual.
1398
1399 If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
1400 size before starting the transfer if you use chunked encoding. You enable this
1401 by adding a header like "Transfer-Encoding: chunked" with \fB-httpheader\fP.
1402 With HTTP 1.0 or without chunked transfer, you must specify the size.
1403
1404 .TP
1405 .B -maxfilesize
1406 This allows you to specify the maximum size (in bytes) of a file to download.
1407 If the file requested is larger than this value, the transfer will not start
1408 and error 'filesize exceeded' (63) will be returned.
1409
1410 NOTE: The file size is not always known prior to download, and for such files
1411 this option has no effect even if the file transfer ends up being larger than
1412 this given limit. This concerns both FTP and HTTP transfers.
1413
1414 .TP
1415 .B -timecondition
1416 This defines how the \fBtimevalue\fP value is treated. You can set this
1417 parameter to \fBifmodsince\fP or \fBifunmodsince\fP.  This feature applies to
1418 HTTP, FTP and FILE.
1419
1420 .TP
1421 .B -timevalue
1422 This should be the time in seconds since 1 jan 1970, and the time will be
1423 used in a condition as specified with \fBtimecondition\fP.
1424
1425
1426 .SH Connection options
1427
1428 .TP
1429 .B -timeout
1430 Pass the maximum time in seconds that you allow
1431 the TclCurl transfer operation to take. Do note that normally, name lookups
1432 may take a considerable time and that limiting the operation to less than a
1433 few minutes risks aborting perfectly normal operations. This option will
1434 cause libcurl to use the SIGALRM to enable time-outing system calls.
1435
1436 In unix-like systems, this might cause signals to be used unless
1437 \fB-nosignal\fP is used.
1438
1439 .TP
1440 .B -timeoutms
1441 Like \fBtimeout\fP but takes a number of milliseconds instead. If libcurl is
1442 built to use the standard system name resolver, that part will still use
1443 full-second resolution for timeouts.
1444
1445 .TP
1446 .B -lowspeedlimit
1447 Pass the speed in bytes per second that the transfer should be below during
1448 .B lowspeedtime
1449 seconds for the extension to consider it too slow and abort.
1450
1451 .TP
1452 .B -lowspeedtime
1453 Pass the time in seconds that the transfer should be below the
1454 .B lowspeedlimit
1455 for the extension to consider it too slow and abort.
1456
1457 .TP
1458 .B -maxsendspeed
1459 Pass a speed in bytes per seconds. If an upload exceeds this speed on cumulative
1460 average during the transfer, the transfer will pause to keep the average rate less
1461 than or equal to the parameter value.  Defaults to unlimited speed.
1462
1463 .TP
1464 .B -maxrecvspeed
1465 Pass a speed in bytes per second. If a download exceeds this speed on cumulative
1466 average during the transfer, the transfer will pause to keep the average rate less
1467 than or equal to the parameter value. Defaults to unlimited speed.
1468
1469 .TP
1470 .B -maxconnects
1471 Sets the persistent connection cache size in all the protocols that support 
1472 persistent conecctions. The set amount will be the maximum amount of simultaneous
1473 connections that TclCurl may cache in this easy handle. Default is 5, and there
1474 isn't much point in changing this value unless you are perfectly aware of how this
1475 work and changes TclCurl's behaviour.
1476
1477 When reaching the maximum limit, TclCurl closes the oldest connection in the cache
1478 to prevent the number of open connections to increase. 
1479
1480 \fBNote\fP: if you have already performed transfers with this curl handle,
1481 setting a smaller
1482 .B maxconnects
1483 than before may cause open connections to unnecessarily get closed.
1484
1485 If you add this easy handle to a multi handle, this setting is not
1486 being acknowledged, instead you must configure the multi handle its own
1487 \fBmaxconnects\fP option.
1488
1489 .TP
1490 .B -connecttimeout
1491 Maximum time in seconds that you allow the
1492 connection to the server to take.  This only limits the connection phase, once
1493 it has connected, this option is of no more use. Set to zero to disable
1494 connection timeout (it will then only timeout on the internal timeouts).
1495
1496 In unix-like systems, this might cause signals to be used unless
1497 \fB-nosignal\fP is set.
1498
1499 .TP
1500 .B -connecttimeoutms
1501 Like \fBconnecttimeout\fP but takes a number of milliseconds instead. If libcurl
1502 is built to use the standard system name resolver, that part will still use
1503 full-second resolution for timeouts.
1504
1505 .TP
1506 .B -ipresolve
1507 Allows an application to select what kind of IP addresses to use when
1508 resolving host names. This is only interesting when using host names
1509 that resolve addresses using more than one version of IP. The allowed
1510 values are:
1511 .RS
1512 .TP 5
1513 .B whatever
1514 Default, resolves addresses to all IP versions that your system allows.
1515 .TP
1516 .B v4
1517 Resolve to ipv4 addresses.
1518 .TP
1519 .B v6
1520 Resolve to ipv6 addresses.
1521 .RE
1522
1523 .TP
1524 .B -resolve
1525 Pass a list of strings with host name resolve information to use for requests with
1526 this handle.
1527
1528 Each single name resolve string should be written using the format
1529 HOST:PORT:ADDRESS where HOST is the name TclCurl will try to resolve, PORT is
1530 the port number of the service where TclCurl wants to connect to the HOST and
1531 ADDRESS is the numerical IP address. If libcurl is built to support IPv6,
1532 ADDRESS can be either IPv4 or IPv6 style addressing.
1533
1534 This option effectively pre-populates the DNS cache with entries for the
1535 host+port pair so redirects and everything that operations against the
1536 HOST+PORT will instead use your provided ADDRESS.
1537
1538 You can remove names from the DNS cache again, to stop providing these fake
1539 resolves, by including a string in the linked list that uses the format
1540 "\-HOST:PORT". The host name must be prefixed with a dash, and the host name
1541 and port number must exactly match what was already added previously.
1542
1543 .TP
1544 .B -usessl
1545 Pass a one of the values from below to make TclCurl use your desired level of SSL for the transfer.
1546 This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc.
1547
1548 You can use ftps:// URLs to explicitly switch on SSL/TSL for the control
1549 connection and the data connection.
1550
1551 Alternatively you can set the option to one of these values:
1552
1553 .RS
1554 .TP 5
1555 .B nope
1556 Do not attempt to use SSL
1557 .TP
1558 .B try
1559 Try using SSL, proceed anyway otherwise.
1560 .TP
1561 .B control
1562 Use SSL for the control conecction or fail with "use ssl failed" (64).
1563 .TP
1564 .B all
1565 Use SSL for all communication or fail with "use ssl failed" (64).
1566 .RE
1567
1568 .SH SSL and security options
1569
1570 .TP
1571 .B -sslcert
1572 Pass a string as parameter. The string should be the file name of your certificate.
1573 The default format is "PEM" and can be changed with \fB-sslcerttype\fP.
1574
1575 With NSS this is the nickname of the certificate you wish to authenticate with.
1576 If you want to use a file from the current directory, please precede it with the 
1577 "./" prefix, in order to avoid confusion with a nickname.
1578
1579 .TP
1580 .B -sslcerttype
1581 Pass a string as parameter. The string should be the format of your certificate.
1582 Supported formats are "PEM" and "DER".
1583
1584 .TP
1585 .B -sslkey
1586 Pass a pointer to a zero terminated string as parameter. The string should be
1587 the file name of your private key. The default format is "PEM" and can be
1588 changed with \fB-sslkeytype\fP.
1589
1590 .TP
1591 .B -sslkeytype
1592 Pass a pointer to a zero terminated string as parameter. The string should be
1593 the format of your private key. Supported formats are "PEM", "DER" and "ENG"
1594
1595 \fBNOTE:\fPThe format "ENG" enables you to load the private key from a crypto
1596 engine. in this case \fB-sslkey\fP is used as an identifier passed to
1597 the engine. You have to set the crypto engine with \fB-sslengine\fP. The "DER"
1598 format key file currently does not work because of a bug in OpenSSL.
1599
1600 .TP
1601 .B -keypasswd
1602 Pass a string as parameter. It will be used as the password required to use the
1603 \fB-sslkey\fP or \fB-sshprivatekeyfile\fP private key.
1604
1605 You never need a pass phrase to load a certificate but you need one to load you
1606 private key. 
1607
1608 This option used to be known as \fB-sslkeypasswd\fP and \fB-sslcertpasswd\fP.
1609
1610 .TP
1611 .B -sslengine
1612 Pass a string as parameter. It will be used as the identifier for the crypto
1613 engine you want to use for your private key.
1614
1615 \fBNOTE:\fPIf the crypto device cannot be loaded, an error will be returned.
1616
1617 .TP
1618 .B -sslenginedefault
1619 Pass a 1 to set the actual crypto engine as the default for (asymmetric) crypto operations.
1620
1621 \fBNOTE:\fPIf the crypto device cannot be set, an error will be returned.
1622
1623 .TP
1624 .B -sslversion
1625 Use it to set what version of SSL/TLS to use. The available options are: 
1626 .RS
1627 .TP 5
1628 .B default
1629 The default action. This will attempt to figure out the remote SSL protocol version,
1630 i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled by default with 7.18.1). 
1631 .TP
1632 .B tlsv1
1633 Force TLSv1
1634 .TP
1635 .B sslv2
1636 Force SSLv2
1637 .TP
1638 .B sslv3
1639 Force SSLv3
1640 .TP
1641 .B tlsv1_0
1642 Force TLSv1.0
1643 .TP
1644 .B tlsv1_1
1645 Force TLSv1.1
1646 .TP
1647 .B tlsv1_2
1648 Force TLSv1.2
1649 .RE
1650
1651 .TP
1652 .B -sslverifypeer
1653 This option determines whether TclCurl verifies the authenticity of the peer's certificate.
1654 A 1 means it verifies; zero means it doesn't. The default is 1. 
1655
1656 When negotiating an SSL connection, the server sends a certificate indicating its identity.
1657 TclCurl verifies whether the certificate is authentic, i.e. that you can trust that the
1658 server is who the certificate says it is. This trust is based on a chain of digital signatures,
1659 rooted in certification authority (CA) certificates you supply.
1660
1661 TclCurl uses a default bundle of CA certificates that comes with libcurl but you can specify
1662 alternate certificates with the \fB-cainfo\fP or the \fB-capath\fP options.
1663
1664 When \fB-sslverifypeer\fP is nonzero, and the verification fails to prove that the certificate
1665 is authentic, the connection fails. When the option is zero, the peer certificate verification
1666 succeeds regardless. 
1667
1668 Authenticating the certificate is not by itself very useful. You typically want to ensure
1669 that the server, as authentically identified by its certificate, is the server you mean to
1670 be talking to, use \fB-sslverifyhost\fP to control that. The check that the host name in
1671 the certificate is valid for the host name you're connecting to is done
1672 independently of this option.
1673
1674 .TP
1675 .B -cainfo
1676 Pass a file naming holding the certificate to verify the peer with. This only
1677 makes sense when used in combination with the \fB-sslverifypeer\fP option, if
1678 it is set to zero \fB-cainfo\fP need not even indicate an accessible file.
1679
1680 This option is by default set to the system path where libcurl's cacert bundle
1681 is assumed to be stored, as established at build time.
1682
1683 When built against NSS this is the directory that the NSS certificate database
1684 resides in.
1685
1686 .TP
1687 .B -issuercert
1688 Pass a string naming a file holding a CA certificate in PEM format. If the option
1689 is set, an additional check against the peer certificate is performed to verify
1690 the issuer is indeed the one associated with the certificate provided by the option.
1691 This additional check is useful in multi-level PKI where one need to enforce the peer
1692 certificate is from a specific branch of the tree.
1693  
1694 This option makes sense only when used in combination with the \fB-sslverifypeer\fP
1695 option. Otherwise, the result of the check is not considered as failure.
1696
1697 .TP
1698 .B -capath
1699 Pass the directory holding multiple CA certificates to verify the peer with.
1700 If libcurl is built against OpenSSL, the certificate directory must be prepared
1701 using the openssl c_rehash utility.
1702 This only makes sense when used in combination with the  \fB-sslverifypeer\fP
1703 option, if it is set to zero, \fB-capath\fP need not even indicate an accessible
1704 path.
1705
1706 This option apparently does not work in Windows due to some limitation in openssl.
1707
1708 This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
1709 NSS-powered libcurl provides the option only for backward compatibility.
1710
1711 .TP
1712 .B -crlfile
1713 Pass a string naming a file with the concatenation of CRL (in PEM format) to use in
1714 the certificate validation that occurs during the SSL exchange.
1715  
1716 When libcurl is built to use NSS or GnuTLS, there is no way to influence the use of
1717 CRL passed to help in the verification process. When built with OpenSSL support,
1718 X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL
1719 check against all the elements of the certificate chain if a CRL file is passed.
1720  
1721 This option makes sense only when used in combination with the \fB-sslverifypeer\fP
1722 option. 
1723
1724 A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned
1725 when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate
1726 verification due to a revocation information found in the CRL does not trigger this specific
1727 error.
1728
1729 .TP
1730 .B -sslverifyhost
1731 This option determines whether TclCurl verifies that the server claims to be
1732 who you want it to be.
1733
1734 When negotiating an SSL connection, the server sends a certificate
1735 indicating its identity.
1736
1737 When \fB-sslverifyhost\fP is set to 2, that certificate must indicate
1738 that the server is the server to which you meant to connect, or the
1739 connection fails.
1740
1741 TclCurl considers the server the intended one when the Common Name field
1742 or a Subject Alternate Name field in the certificate matches the host
1743 name in the URL to which you told Curl to connect.
1744
1745 When set to 1, the certificate must contain a Common Name field,
1746 but it does not matter what name it says. (This is not ordinarily a
1747 useful setting).
1748
1749 When the value is 0, the connection succeeds regardless of the names in
1750 the certificate.
1751
1752 The default value for this option is 2.
1753
1754 This option controls the identity that the server \fIclaims\fP. The server
1755 could be lying. To control lying, see \fB-sslverifypeer\fP. If libcurl is built
1756 against NSS and \fB-verifypeer\fP is zero, \fB-verifyhost\fP is ignored.
1757
1758 .TP
1759 .B -certinfo
1760 Set to '1' to enable TclCurl's certificate chain info gatherer. With this enabled, TclCurl
1761 (if built with OpenSSL) will extract lots of information and data about the certificates
1762 in the certificate chain used in the SSL connection. This data can then be to extracted
1763 after a transfer using the \fBgetinfo\fP command and its option \fBcertinfo\fP.
1764
1765 .TP
1766 .B -randomfile
1767 Pass a file name. The file will be used to read from to seed the random engine
1768 for SSL. The more random the specified file is, the more secure the SSL
1769 connection becomes.
1770
1771 .TP
1772 .B -egdsocket
1773 Pass a path name to the Entropy Gathering Daemon socket. It will be used to seed
1774 the random engine for SSL.
1775
1776 .TP
1777 .B -sslcypherlist
1778 Pass a string holding the ciphers to use for the SSL connection. The list must
1779 consists of one or more cipher strings separated by colons. Commas or spaces
1780 are also acceptable separators but colons are normally used, , - and + can be
1781 used as operators. 
1782
1783 For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA', 'SHA1+DES',
1784 \&'TLSv1' and 'DEFAULT'. The default list is normally set when you compile OpenSSL.
1785
1786 You will find more details about cipher lists on this URL:
1787     http://www.openssl.org/docs/apps/ciphers.html
1788
1789 For NSS valid examples of cipher lists include 'rsa_rc4_128_md5', 'rsa_aes_128_sha',
1790 etc. With NSS you don't add/remove ciphers. If you use this option then all known
1791 ciphers are disabled and only those passed in are enabled.
1792  
1793 You'll find more details about the NSS cipher lists on this URL:
1794 <http://directory.fedora.redhat.com/docs/mod_nss.html>
1795
1796 .TP
1797 .B -sslsessionidcache
1798 Pass a 0 to disable TclCurl's use of SSL session-ID caching or a 1 to enable it.
1799 By default all transfers are done using the cache. While nothing ever
1800 should get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL
1801 implementations in the wild that may require you to disable this in order for you to
1802 succeed.
1803
1804 .TP
1805 .B -krblevel
1806 Set the kerberos security level for FTP, this also enables kerberos awareness.
1807 This is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
1808 is set but does not match one of these, 'private' will be used. Set the string
1809 to NULL to disable kerberos4. Set the string to "" to disable kerberos
1810 support for FTP.
1811
1812 .TP
1813 .B -gssapidelegation
1814 Set the option to 'flag' to allow unconditional GSSAPI credential delegation. The delegation
1815 is disabled by default since 7.21.7. Set the parameter to 'policyflag' to delegate only if
1816 the OK-AS-DELEGATE flag is set in the service ticket in case this feature is supported by the
1817 GSSAPI implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time.
1818
1819
1820 .SH SSH options
1821
1822 .TP
1823 .B -sshauthtypes
1824 The allowed types are:
1825
1826 .RS
1827 .TP 5
1828 .B publickey
1829 .TP
1830 .B password
1831 .TP
1832 .B host
1833 .TP
1834 .B keyboard
1835 .TP
1836 .B any
1837 To let TclCurl pick one
1838 .RE
1839
1840 .TP
1841 .B -sshhostpublickeymd5
1842 Pass a string containing 32 hexadecimal digits. The string should be the 128
1843 bit MD5 cheksum of the remote host public key, and TclCurl will reject the
1844 connection to the host unless the md5sums match. This option is only for SCP
1845 and SFTP transfers.
1846
1847 .TP
1848 .B -publickeyfile
1849 Pass the file name for your public key. If not used, TclCurl defaults to using \fB$HOME/.ssh/id_dsa.pub\fP.
1850 HOME environment variable is set, and just \fBid_dsa\fP in the current directory if not. 
1851
1852 .TP
1853 .B -privatekeyfile
1854 Pass the file name for your private key. If not used, TclCurl defaults to using \fB$HOME/.ssh/id_dsa.pub\fP.
1855 HOME environment variable is set, and just \fBid_dsa\fP in the current directory if not.
1856 If the file is password-protected, set the password with \fB-keypasswd\fP.
1857
1858 .TP
1859 .B -sshknownhosts
1860 Pass a string holding the file name of the known_host file to use. The known_hosts
1861 file should use the OpenSSH file format as supported by libssh2. If this file is
1862 specified, TclCurl will only accept connections with hosts that are known and present
1863 in that file, with a matching public key. Use \fB-sshkeyproc\fP to alter the default
1864 behavior on host and key (mis)matching.
1865
1866 .TP
1867 .B -sshkeyproc 
1868 Pass a the name of the procedure that will be called when the known_host matching has
1869 been done, to allow the application to act and decide for TclCurl how to proceed. The
1870 callback will only be called if \fB-knownhosts\fP is also set.
1871
1872 It gets passed a list with three elements, the first one is a list with the type of the
1873 key from the known_hosts file and the key itself, the second is another list with
1874 the type of the key from the remote site and the key itslef, the third tells you
1875 what TclCurl thinks about the matching status. 
1876
1877 The known key types are: "rsa", "rsa1" and "dss", in any other case "unknown" is given.
1878
1879 TclCurl opinion about how they match may be: "match", "mismatch", "missing" or "error".
1880
1881 The procedure must return:
1882 .RS
1883 .TP 5
1884 .B 0
1885 The host+key is accepted and TclCurl will append it to the known_hosts file before
1886 continuing with the connection. This will also add the host+key combo to the known_host
1887 pool kept in memory if it wasn't already present there. The adding of data to
1888 the file is done by completely replacing the file with a new copy, so the permissions of
1889 the file must allow this.
1890 .TP
1891 .B 1
1892 The host+key is accepted, TclCurl will continue with the connection. This will also add
1893 the host+key combo to the known_host pool kept in memory if it wasn't already present
1894 there.
1895 .TP
1896 .B 2
1897 The host+key is rejected. TclCurl will close the connection.
1898 .TP
1899 .B 3
1900 The host+key is rejected, but the SSH connection is asked to be kept alive. This feature
1901 could be used when the app wants to somehow return back and act on the host+key situation
1902 and then retry without needing the overhead of setting it up from scratch again.
1903 .RE
1904
1905 Any other value will cause the connection to be closed.
1906
1907 .SH Other options
1908
1909 .TP
1910 .B -headervar
1911 Name of the Tcl array variable where TclCurl will store the headers returned
1912 by the server.
1913
1914 .TP
1915 .B -bodyvar
1916 Name of the Tcl variable where TclCurl will store the file requested, the file
1917 may contain text or binary data.
1918
1919 .TP
1920 .B -canceltransvar
1921 Name of a Tcl variable, in case you have defined a procedure to call with
1922 \fB-progressproc\fP setting this variable to '1' will cancel the transfer.
1923
1924 .TP
1925 .B -command
1926 Executes the given command after the transfer is done, since it only works
1927 with blocking transfers, it is pretty much useless.
1928
1929 .TP
1930 .B -share
1931 Pass a share handle as a parameter. The share handle must have been created by
1932 a previous call to \fBcurl::shareinit\fP. Setting this option, will make this
1933 handle use the data from the shared handle instead of keeping the data to itself.
1934 See \fItclcurl_share\fP for details.
1935
1936 .TP
1937 .B -newfileperms
1938 Pass a number as a parameter, containing the value of the permissions that will
1939 be assigned to newly created files on the remote server. The default value is 0644,
1940 but any valid value can be used. The only protocols that can use this are sftp://,
1941 scp:// and file://.
1942
1943 .TP
1944 .B -newdirectoryperms
1945 Pass a number as a parameter, containing the value of the permissions that will be
1946 assigned to newly created directories on the remote server. The default value is 0755,
1947 but any valid value can be used. The only protocols that can use this are sftp://, scp://
1948 and file://.
1949
1950 .SH Telnet options
1951
1952 .TP
1953 .B -telnetoptions
1954 Pass a list with variables to pass to the telnet negotiations. The variables should be in
1955 the format <option=value>. TclCurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'.
1956 See the TELNET standard for details.
1957
1958 .SH NOT SUPPORTED
1959 Some of the options libcurl offers are not supported, I don't think them
1960 worth supporting in TclCurl but if you need one of them don't forget to
1961 complain:
1962 .sp
1963 .B CURLOPT_FRESH_CONNECT, CURLOPT_FORBID_REUSE, CURLOPT_PRIVATE,
1964 .B CURLOPT_SSL_CTX_FUNCTION, CURLOPT_SSL_CTX_DATA, CURLOPT_SSL_CTX_FUNCTION and
1965 .B CURLOPT_CONNECT_ONLY, CURLOPT_OPENSOCKETFUNCTION, CURLOPT_OPENSOCKETDATA.
1966
1967 .SH curlHandle perform
1968 This procedure is called after the
1969 .B init
1970 and all the
1971 .B configure
1972 calls are made, and will perform the transfer as described in the options.
1973 .sp
1974 It must be called with the same
1975 \fIcurlHandle\fP \fBcurl::init\fP call returned.
1976 You can do any amount of calls to perform while using the same handle. If you
1977 intend to transfer more than one file, you are even encouraged to do
1978 so. TclCurl will then attempt to re-use the same connection for the following
1979 transfers, thus making the operations faster, less CPU intense and using less
1980 network resources. Just note that you will have to use
1981 .I configure
1982 between the invokes to set options for the following perform.
1983 .sp
1984 You must never call this procedure simultaneously from two places using the
1985 same handle. Let it return first before invoking it another time. If
1986 you want parallel transfers, you must use several curl handles.
1987 .TP
1988 .B RETURN VALUE
1989 \&'0' if all went well, non-zero if it didn't. In case of error, if the
1990 .I errorbuffer
1991 was set with
1992 .I configure
1993 there will be a readable error message.
1994 The error codes are:
1995 .IP 1
1996 Unsupported protocol. This build of TclCurl has no support for this protocol.
1997 .IP 2
1998 Very early initialization code failed. This is likely to be and internal error
1999 or a resource problem where something fundamental couldn't get done at init time.
2000 .IP 3
2001 URL malformat. The syntax was not correct.
2002 .IP 4
2003 A requested feature, protocol or option was not found built-in in this libcurl
2004 due to a build-time decision. This means that a feature or option was not
2005 enabled or explicitly disabled when libcurl was built and in order to get it
2006 to function you have to get a rebuilt libcurl.
2007 .IP 5
2008 Couldn't resolve proxy. The given proxy host could not be resolved.
2009 .IP 6
2010 Couldn't resolve host. The given remote host was not resolved.
2011 .IP 7
2012 Failed to connect to host or proxy.
2013 .IP 8
2014 FTP weird server reply. The server sent data TclCurl couldn't parse.
2015 The given remote server is probably not an OK FTP server.
2016 .IP 9
2017 We were denied access to the resource given in the URL. For FTP, this occurs
2018 while trying to change to the remote directory.
2019 .IP 11
2020 FTP weird PASS reply. TclCurl couldn't parse the reply sent to the PASS request.
2021 .IP 13
2022 FTP weird PASV reply, TclCurl couldn't parse the reply sent to the PASV or EPSV
2023 request.
2024 .IP 14
2025 FTP weird 227 format. TclCurl couldn't parse the 227-line the server sent.
2026 .IP 15
2027 FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
2028 .IP 17
2029 FTP couldn't set type. Couldn't change transfer method to either binary or
2030 ascii.
2031 .IP 18
2032 Partial file. Only a part of the file was transfered, this happens when
2033 the server first reports an expected transfer size and then delivers data
2034 that doesn't match the given size.
2035 .IP 19
2036 FTP couldn't RETR file, we either got a weird reply to a 'RETR' command or
2037 a zero byte transfer.
2038 .IP 21
2039 Quote error. A custom 'QUOTE' returned error code 400 or higher (for FTP) or
2040 otherwise indicated unsuccessful completion of the command.
2041 .IP 22
2042 HTTP returned error. This return code only appears if \fB-failonerror\fP is
2043 used and the HTTP server returns an error code that is 400 or higher.
2044 .IP 23
2045 Write error. TclCurl couldn't write data to a local filesystem or an error
2046 was returned from a write callback.
2047 .IP 25
2048 Failed upload failed. For FTP, the server typcially denied the STOR
2049 command. The error buffer usually contains the server's explanation to this.
2050 .IP 26
2051 Read error. There was a problem reading from a local file or an error was returned
2052 from the read callback.
2053 .IP 27
2054 Out of memory. A memory allocation request failed. This should never happen unless
2055 something weird is going on in your computer.
2056 .IP 28
2057 Operation timeout. The specified time-out period was reached according to the
2058 conditions.
2059 .IP 30
2060 The FTP PORT command failed, not all FTP servers support the PORT command,
2061 try  doing a transfer using PASV instead!.
2062 .IP 31
2063 FTP couldn't use REST. This command is used for resumed FTP transfers.
2064 .IP 33
2065 Range error. The server doesn't support or accept range requests.
2066 .IP 34
2067 HTTP post error. Internal post-request generation error.
2068 .IP 35
2069 SSL connect error. The SSL handshaking failed, the error buffer may have
2070 a clue to the reason, could be certificates, passwords, ...
2071 .IP 36
2072 The download could not be resumed because the specified offset was out of the
2073 file boundary.
2074 .IP 37
2075 A file given with FILE:// couldn't be read. Did you checked the permissions?
2076 .IP 38
2077 LDAP cannot bind. LDAP bind operation failed.
2078 .IP 39
2079 LDAP search failed.
2080 .IP 41
2081 A required zlib function was not found.
2082 .IP 42
2083 Aborted by callback. An application told TclCurl to abort the operation.
2084 .IP 43
2085 Internal error. A function was called with a bad parameter.
2086 .IP 45
2087 Interface error. A specified outgoing interface could not be used.
2088 .IP 47
2089 Too many redirects. When following redirects, TclCurl hit the maximum amount, set
2090 your limit with \-\-maxredirs
2091 .IP 48
2092 An option passed to TclCurl is not recognized/known. Refer to the appropriate
2093 documentation. This is most likely a problem in the program that uses
2094 TclCurl. The error buffer might contain more specific information about which
2095 exact option it concerns.
2096 .IP 49
2097 A telnet option string was illegally formatted.
2098 .IP 51
2099 The remote peer's SSL certificate or SSH md5 fingerprint wasn't ok
2100 .IP 52
2101 The server didn't reply anything, which here is considered an error.
2102 .IP 53
2103 The specified crypto engine wasn't found.
2104 .IP 54
2105 Failed setting the selected SSL crypto engine as default!
2106 .IP 55
2107 Failed sending network data.
2108 .IP 56
2109 Failure with receiving network data.
2110 .IP 58
2111 Problem with the local client certificate.
2112 .IP 59
2113 Couldn't use specified SSL cipher.
2114 .IP 60
2115 Peer certificate cannot be authenticated with known CA certificates.
2116 .IP 61
2117 Unrecognized transfer encoding.
2118 .IP 62
2119 Invalid LDAP URL.
2120 .IP 63
2121 Maximum file size exceeded.
2122 .IP 64
2123 SSL use failed.
2124 .IP 65
2125 Sending the data requires a rewind that failed, since TclCurl should
2126 take care of it for you, it means you found a bug.
2127 .IP 66
2128 Failed to initialise ssl engine.
2129 .IP 67
2130 Failed to login, user password or similar was not accepted.
2131 .IP 68
2132 File not found on TFTP server.
2133 .IP 69
2134 There is a permission problem with the TFTP request.
2135 .IP 70
2136 The remote server has run out of space.
2137 .IP 71
2138 Illegal TFTP operation.
2139 .IP 72
2140 Unknown transfer ID.
2141 .IP 73
2142 TFTP file already exists and will not be overwritten.
2143 .IP 74
2144 No such user in the TFTP server and good behaving TFTP servers
2145 should never return this.
2146 .IP 75
2147 Character conversion failed.
2148 .IP 77
2149 Problem with reading the SSL CA cert (path? access rights?).
2150 .IP 78
2151 Remote file not found
2152 .IP 79
2153 Error from the SSH layer
2154 .IP 80
2155 Failed to shut down the SSL connection
2156 .IP 82
2157 Failed to load CRL file
2158 .IP 83
2159 Issuer check failed
2160 .IP 84
2161 The FTP server does not understand the PRET command at all or does not support
2162 the given argument. Be careful when using \fB-customrequest\fP, a
2163 custom LIST command will be sent with PRET CMD before PASV as well.
2164 .IP 85
2165 Mismatch of RTSP CSeq numbers.
2166 .IP 86
2167 Mismatch of RTSP Session Identifiers.
2168 .IP 87
2169 Unable to parse FTP file list (during FTP wildcard downloading).
2170 .IP 88
2171 Chunk callback reported error.
2172
2173 .SH curlHandle getinfo option
2174 Request internal information from the curl session with this procedure.
2175 This procedure is intended to get used *AFTER* a performed transfer,
2176 and can be relied upon only if the \fBperform\fP returns 0.  Use
2177 this function AFTER a performed transfer if you want to get
2178 transfer-oriented data.
2179
2180 The following information can be extracted:
2181
2182 .TP
2183 .B effectiveurl
2184 Returns the last used effective URL.
2185
2186 .TP
2187 .B responsecode
2188 Returns the last received HTTP or FTP code. This will be zero if no server
2189 response code has been received. Note that a proxy's CONNECT response should
2190 be read with \fBhttpconnectcode\fP and not this.
2191
2192 .TP
2193 .B httpconnectcode
2194 Returns the last received proxy response code to a CONNECT request.
2195
2196 .TP
2197 .B filetime
2198 Returns the remote time of the retrieved document (in number of seconds
2199 since 1 jan 1970 in the GMT/UTC time zone). If you get \-1,
2200 it can be because of many reasons (unknown, the server hides it or the
2201 server doesn't support the command that tells document time etc) and the time
2202 of the document is unknown.
2203 .sp
2204 In order for this to work you have to set the \fB-filetime\fP option before
2205 the transfer.
2206
2207 .TP
2208 .B namelookuptime
2209 Returns the time, in seconds, it took from the start until the name resolving
2210 was completed.
2211
2212 .TP
2213 .B connecttime
2214 Returns the time, in seconds, it took from the start until the connect to the
2215 remote host (or proxy) was completed.
2216
2217 .TP
2218 .B appconnecttime
2219 Returns the time, in seconds, it took from the start until the SSL/SSH
2220 connect/handshake to the remote host was completed. This time is most often very
2221 near to the PRETRANSFER time, except for cases such as HTTP pippelining where the
2222 pretransfer time can be delayed due to waits in line for the pipeline and more.
2223
2224 .TP
2225 .B pretransfertime
2226 Returns the time, in seconds, it took from the start until the file transfer
2227 is just about to begin. This includes all pre-transfer commands and
2228 negotiations that are specific to the particular protocol(s) involved.
2229
2230 .TP
2231 .B starttransfertime
2232 Returns the time, in seconds, it took from the start until the first byte
2233 is just about to be transfered. This includes the \fBpretransfertime\fP,
2234 and also the time the server needs to calculate the result.
2235
2236 .TP
2237 .B totaltime
2238 Returns the total transaction time, in seconds, for the previous transfer,
2239 including name resolving, TCP connect etc.
2240
2241 .TP
2242 .B redirecturl
2243 Returns the URL a redirect would take you to if you enable \fBfollowlocation\fP.
2244 This can come very handy if you think using the built-in libcurl redirect logic
2245 isn't good enough for you but you would still prefer to avoid implementing all
2246 the magic of figuring out the new URL.
2247
2248 .TP
2249 .B redirecttime
2250 Returns the total time, in seconds, it took for all redirection steps
2251 including name lookup, connect, pretransfer and transfer before
2252 the final transaction was started, it returns the complete execution
2253 time for multiple redirections, so it returns zero if no redirections
2254 were needed.
2255
2256 .TP
2257 .B redirectcount
2258 Returns the total number of redirections that were actually followed.
2259
2260 .TP
2261 .B numconnects
2262 Returns how many new connections TclCurl had to create to achieve the
2263 previous transfer (only the successful connects are counted). Combined
2264 with \fBredirectcount\fP you are able to know how many times TclCurl
2265 successfully reused existing connection(s) or not. See the Connection
2266 Options of \fBsetopt\fP to see how TclCurl tries to make persistent
2267 connections to save time.
2268
2269 .TP
2270 .B primaryip
2271 Returns the IP address of the most recent connection done with this handle.
2272 This string may be IPv6 if that's enabled.
2273
2274 .TP
2275 .B primaryport
2276 Returns the destination port of the most recent connection done with this handle.
2277
2278 .TP
2279 .B localip
2280 Returns the local (source) IP address of the most recent connection done
2281 with this handle. This string may be IPv6 if that's enabled.
2282
2283 .TP
2284 .B localport
2285 Returns the local (source) port of the most recent connection done with this handle.
2286
2287 .TP
2288 .B sizeupload
2289 Returns the total amount of bytes that were uploaded.
2290
2291 .TP
2292 .B sizedownload
2293 Returns the total amount of bytes that were downloaded. The amount is only
2294 for the latest transfer and will be reset again for each new transfer.
2295
2296 .TP
2297 .B speeddownload
2298 Returns the average download speed, measured in bytes/second, for the complete download.
2299
2300 .TP
2301 .B speedupload
2302 Returns the average upload speed, measured in bytes/second, for the complete upload.
2303
2304 .TP
2305 .B headersize
2306 Returns the total size in bytes of all the headers received.
2307
2308 .TP
2309 .B requestsize
2310 Returns the total size of the issued requests. This is so far only for HTTP
2311 requests. Note that this may be more than one request if followLocation is true.
2312
2313 .TP
2314 .B sslverifyresult
2315 Returns the result of the certification verification that was requested
2316 (using the \-sslverifypeer option to configure).
2317
2318 .TP
2319 .B sslengines
2320 Returns a \fBlist\fP of the OpenSSL crypto-engines supported. Note that engines are
2321 normally implemented in separate dynamic libraries. Hence not all the returned
2322 engines may be available at run-time.
2323
2324 .TP
2325 .B contentlengthdownload
2326 Returns the content-length of the download. This is the value read from the
2327 .B Content-Length:
2328 field. If the size isn't known, it returns \-1.
2329
2330 .TP
2331 .B contentlengthupload
2332 Returns the specified size of the upload.
2333
2334 .TP
2335 .B contenttype
2336 Returns the content-type of the downloaded object. This is the value
2337 read from the Content-Type: field. If you get an empty string, it  means
2338 the server didn't send a valid Content-Type header or that the protocol
2339 used doesn't support this.
2340
2341 .TP
2342 .B httpauthavail
2343 Returns a list with the authentication method(s) available.
2344
2345 .TP
2346 .B proxyauthavail
2347 Returns a list with the authentication method(s) available for your
2348 proxy athentication.
2349
2350 .TP
2351 .B oserrno
2352 Returns the errno value from a connect failure. This value is only set on
2353 failure, it is no reset after a successfull operation.
2354
2355 .TP
2356 .B cookielist
2357 Returns a list of all cookies TclCurl knows (expired ones, too). If there
2358 are no cookies (cookies for the handle have not been enabled or simply
2359 none have been received) the list will be empty.
2360
2361 .TP
2362 .B ftpentrypath 
2363 Returns a string holding the path of the entry path. That is the initial path
2364 TclCurl ended up in when logging on to the remote FTP server. Returns an empty
2365 string if something is wrong.
2366
2367 .TP
2368 .B certinfo
2369 Returns list with information about the certificate chain, assuming you had the
2370 \fB-certinfo\fP option enabled when the previous request was done. The list
2371 first item reports how many certs it found and then you can extract info for each
2372 of those certs by following the list. The info chain is provided in a series of data
2373 in the format "name:content" where the content is for the specific named data.
2374
2375 NOTE: this option is only available in libcurl built with OpenSSL support.
2376
2377 .TP
2378 .B conditionunmet
2379 Returns the number 1 if the condition provided in the previous request
2380 didn't match (see \fItimecondition\fP), you will get a zero if the condition
2381 instead was met.
2382
2383 .SH curlHandle cleanup
2384 This procedure must be the last one to call for a curl session. It is the
2385 opposite of the
2386 .I curl::init
2387 procedure and must be called with the same
2388 .I curlhandle
2389 as input as the curl::init call returned.
2390 This will effectively close all connections TclCurl has used and possibly
2391 has kept open until now. Don't call this procedure if you intend to transfer
2392 more files.
2393
2394 .SH curlHandle reset
2395
2396 Re-initializes all options previously set on a specified handle to the
2397 default values.
2398
2399 This puts back the handle to the same state as it was in when it was just
2400 created with curl::init.
2401
2402 It does not change the following information kept in the handle: live
2403 connections, the Session ID cache, the DNS cache, the cookies and shares.
2404
2405 .SH curlHandle duphandle
2406 This procedure will return a new curl handle, a duplicate,
2407 using all the options previously set in the input curl handle.
2408 Both handles can subsequently be used independently and
2409 they must both be freed with
2410 .B cleanup.
2411 The new handle will not inherit any state information,
2412 connections, SSL sessions or cookies.
2413 .TP
2414 .B RETURN VALUE
2415 A new curl handle or an error message if the copy fails.
2416
2417 .SH curlHandle pause
2418 You can use this command from within a progress callback procedure
2419 to pause the transfer.
2420
2421 .SH curlHandle resume
2422 Resumes a transfer paused with \fBcurlhandle pause\fP
2423
2424 .SH curl::transfer
2425 In case you do not want to use persistent connections you can use this
2426 command, it takes the same arguments as the \fIcurlHandle\fP \fBconfigure\fP
2427 and will init, configure, perform and cleanup a connection for you.
2428
2429 You can also get the \fIgetinfo\fP information by using \fI-infooption variable\fP
2430 pairs, after the transfer \fIvariable\fP will contain the value that would have
2431 been returned by \fI$curlHandle getinfo option\fP.
2432 .TP
2433 .B RETURN VALUE
2434 The same error code \fBperform\fP would return.
2435
2436 .SH curl::version
2437 Returns a string with the version number of tclcurl, libcurl and some of
2438 its important components (like OpenSSL version).
2439 .TP
2440 .B RETURN VALUE
2441 The string with the version info.
2442
2443 .SH curl::escape url
2444 This procedure will convert the given input string to an URL encoded string and
2445 return that. All input characters that are not a-z,
2446 A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a
2447 two-digit hexadecimal number)
2448 .TP
2449 .B RETURN VALUE
2450 The converted string.
2451 .SH curl::unescape url
2452 This procedure will convert the given URL encoded input string to a "plain
2453 string" and return that. All input characters that
2454 are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
2455 converted to their plain text versions.
2456 .TP
2457 .B RETURN VALUE
2458 The string unencoded.
2459
2460 .SH curl::curlConfig option
2461 Returns some information about how you have
2462 .B cURL
2463 installed.
2464
2465 .TP
2466 .B -prefix
2467 Returns the directory root where you installed
2468 .B cURL
2469 .TP
2470 .B -feature
2471 Returns a list containing particular main features the installed
2472 .B libcurl
2473 was built with. The list may include SSL, KRB4 or IPv6, do not
2474 assume any particular order.
2475 .TP
2476 .B -vernum
2477 Outputs  version  information  about  the installed libcurl, in
2478 numerical mode.  This outputs the  version  number,  in hexadecimal,
2479 with 8 bits for each part; major, minor, patch. So  that  libcurl
2480 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as
2481 0c0d0e...
2482
2483 .SH curl::versioninfo option
2484 Returns information about various run-time features in TclCurl.
2485
2486 Applications should use this information to judge if things are possible to do
2487 or not, instead of using compile-time checks, as dynamic/DLL libraries can be
2488 changed independent of applications.
2489
2490 .TP
2491 .B -version
2492 Returns the version of libcurl we are using.
2493
2494 .TP
2495 .B -versionnum
2496 Retuns the version of libcurl we are using in hexadecimal with 8 bits for each
2497 part; major, minor, patch. So  that  libcurl 7.7.4 would appear as 070704 and
2498 libcurl 12.13.14 would appear as 0c0d0e... Note that the initial zero might be
2499 omitted.
2500
2501 .TP
2502 .B -host
2503 Returns a string with the host information as discovered by a configure
2504 script or set by the build environment.
2505
2506 .TP
2507 .B -features
2508 Returns a list with the features compiled into libcurl, the possible elements are:
2509 .RS
2510 .TP 5
2511 .B ASYNCHDNS
2512 Libcurl was built with support for asynchronous name lookups, which allows
2513 more exact timeouts (even on Windows) and less blocking when using the multi
2514 interface.
2515 .TP
2516 .B CONV
2517 Libcurl was built with support for character conversions.
2518 .TP
2519 .B DEBUG
2520 Libcurl was built with extra debug capabilities built-in. This is mainly of
2521 interest for libcurl hackers. 
2522 .TP
2523 .B GSSNEGOTIATE
2524 Supports HTTP GSS-Negotiate.
2525 .TP
2526 .B IDN
2527 Supports IDNA, domain names with international letters.
2528 .TP
2529 .B IPV6
2530 Supports IPv6.
2531 .TP
2532 .B KERBEROS4
2533 Supports kerberos4 (when using FTP).
2534 .TP
2535 .B LARGEFILE
2536 Libcurl was built with support for large files.
2537 .TP
2538 .B LIBZ
2539 Supports HTTP deflate using libz.
2540 .TP
2541 .B NTML
2542 Supports HTTP NTLM
2543 .TP
2544 .B SPNEGO
2545 Libcurl was built with support for SPNEGO authentication (Simple and Protected
2546 GSS-API Negotiation Mechanism, defined in RFC 2478)
2547 .TP
2548 .B SSL
2549 Supports SSL (HTTPS/FTPS)
2550 .TP
2551 .B SSPI
2552 Libcurl was built with support for SSPI. This is only available on Windows and
2553 makes libcurl use Windows-provided functions for NTLM authentication. It also
2554 allows libcurl to use the current user and the current user's password without
2555 the app having to pass them on.
2556 .TP
2557 .B TLSAUTH_SRP
2558 Libcurl was built with support for TLS-SRP.
2559 .B NTLM_WB
2560 Libcurl was built with support for NTLM delegation to a winbind helper.
2561 .RE
2562 Do not assume any particular order.
2563
2564 .TP
2565 .B -sslversion
2566 Returns a string with the OpenSSL version used, like OpenSSL/0.9.6b.
2567
2568 .TP
2569 .B -sslversionnum
2570 Returns the numerical OpenSSL version value as defined by the OpenSSL project.
2571 If libcurl has no SSL support, this is 0.
2572
2573 .TP
2574 .B -libzversion
2575 Returns a string, there is no numerical  version, for example: 1.1.3.
2576
2577 .TP
2578 .B -protocols
2579 Lists what particular protocols the installed TclCurl was built to support.
2580 At the time of writing, this list may include HTTP, HTTPS, FTP, FTPS,
2581 FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols
2582 will be listed using uppercase. There may be none, one or several protocols
2583 in the list.
2584
2585 .SH curl::easystrerror errorCode
2586 This procedure returns a string describing the error code passed in the argument.
2587
2588 .SH "SEE ALSO"
2589 .I curl, The art of HTTP scripting (at http://curl.haxx.se), RFC 2396,