~ubuntu-branches/ubuntu/trusty/tclcurl/trusty

« back to all changes in this revision

Viewing changes to doc/tclcurl.html

  • Committer: Package Import Robot
  • Author(s): Sven Hoexter
  • Date: 2012-06-02 20:48:44 UTC
  • mfrom: (1.2.9) (4.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20120602204844-vi72mu1if5trqssn
Tags: 7.22.0-1
* New upstream release
  + Remove debian/patches/deprecated-curl-types - fixed upstream.
  + Build-depend on libcurl4-gnutls-dev (>= 7.22.0).
  + Refresh all patches.
* Remove overrides for dh_clean and dh_installexamples. All the
  build artefacts which required special handling are no longer
  included in the upstream tarball.
* Switch to dh compat level 9, build-depend on debhelper (>= 9).
* Switch LDFLAGS to DEB_LDFLAGS_MAINT_PREPEND.
* Change Standards-Version to 3.9.3 - no changes required.
* Update copyright year and download location in debian/copyright.
* Update homepage in debian/watch and debian/control.
* Continue to move the libs to /usr/lib/tcltk/ for now against
  the will of the buildsystem. Original installation path is
  now architecture dependend.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<HTML><HEAD><TITLE>Manpage of TclCurl</TITLE>
2
2
</HEAD><BODY>
3
3
<H1>TclCurl</H1>
4
 
Section: Easy inteface (n)<BR>Updated: 8 September 2008<BR>
 
4
Section: Easy inteface (n)<BR>Updated: 03 October 2011<BR>
5
5
<A NAME="lbAB">&nbsp;</A>
6
6
<hr>
7
7
<H2>NAME</H2>
8
8
 
9
 
TclCurl: - get  a  URL with FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE or LDAP syntax.
 
9
TclCurl: - get  a  URL with FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP,
 
10
LDAPS, IMAP, IMAPS, POP, POP3, SMTP, SMTPS and gopher syntax.
10
11
<A NAME="lbAC">&nbsp;</A>
11
12
<H2>SYNOPSIS</H2>
12
13
 
61
62
<A NAME="lbAD">&nbsp;</A>
62
63
<H2>DESCRIPTION</H2>
63
64
 
64
 
The TclCurl extension gives Tcl programmers access to the libcurl
65
 
library written by <a href="http://daniel.haxx.se">Daniel Stenberg</a>, with it you can download urls,
66
 
upload them and many other neat tricks, for more information check
67
 
<A HREF="http://curl.haxx.se">cURL's web page</A>
 
65
The TclCurl extension gives Tcl programmers access to the <a href="http://curl.haxx.se/libcurl/">libcurl</a>
 
66
library written by <a href="http://daniel.haxx.se/">Daniel Stenberg</a>, with it you can download urls,
 
67
upload them and many other neat tricks.
68
68
 
69
69
<A NAME="lbAE">&nbsp;</A>
70
70
<H2>curl::init</H2>
147
147
<DT><B>-noprogress</B>
148
148
 
149
149
<DD>
150
 
A 1 tells the extension to turn on the built-in progress meter.
151
 
Nowadays it is turn off by default.
 
150
A 1 tells the extension to turn on the progress meter
 
151
completely. It will also prevent the <I>progessproc</I> from getting called.
152
152
<P>
153
153
<DT><B>-nosignal</B>
154
154
 
158
158
option is mainly here to allow multi-threaded unix applications to still
159
159
set/use all timeout options etc, without risking getting signals.
160
160
<P>
161
 
<P>
162
 
</DL>
 
161
If this option is set and libcurl has been built with the standard name resolver,
 
162
timeouts will not occur while the name resolve takes place. Consider building
 
163
libcurl with c-ares support to enable asynchronous DNS lookups, which enables
 
164
nice timeouts for name resolves without signals. 
 
165
<P>
 
166
Setting <I>nosignal</I> to 1 makes libcurl NOT ask the system to ignore
 
167
SIGPIPE signals, which otherwise are sent by the system when trying to send
 
168
data to a socket which is closed in the other end. libcurl makes an effort to
 
169
never cause such SIGPIPEs to trigger, but some operating systems have no way
 
170
to avoid them and even on those that have there are some corner cases when
 
171
they may still happen, contrary to our desire. In addition, using
 
172
<I>ntlm_Wb</I> authentication could cause a SIGCHLD signal to be raised.
 
173
<P>
 
174
<DT><B>-wildcard</B>
 
175
 
 
176
<DD>
 
177
Set this option to 1 if you want to transfer multiple files according to a
 
178
file name pattern. The pattern can be specified as part of the
 
179
<B>-url</B> option, using an fnmatch-like pattern (Shell Pattern
 
180
Matching) in the last part of URL (file name).
 
181
<P>
 
182
By default, TClCurl uses its internal wildcard matching implementation. You
 
183
can provide your own matching function by the <B>-fnmatchproc</B> option.
 
184
<P>
 
185
This feature is only supported by the FTP download for now.
 
186
<P>
 
187
A brief introduction of its syntax follows:
 
188
<DL COMPACT><DT><DD>
 
189
<DL COMPACT>
 
190
<DT>* - ASTERISK<DD>
 
191
ftp://example.com/some/path/*.txt (for all txt's from the root directory)
 
192
</DL>
 
193
</DL>
 
194
 
 
195
<DL COMPACT><DT><DD>
 
196
<DL COMPACT>
 
197
<DT>? - QUESTION MARK<DD>
 
198
Question mark matches any (exactly one) character.
 
199
<P>
 
200
ftp://example.com/some/path/photo?.jpeg
 
201
</DL>
 
202
</DL>
 
203
 
 
204
<DL COMPACT><DT><DD>
 
205
<DL COMPACT>
 
206
<DT>[ - BRACKET EXPRESSION<DD>
 
207
The left bracket opens a bracket expression. The question mark and asterisk have
 
208
no special meaning in a bracket expression. Each bracket expression ends by the
 
209
right bracket and matches exactly one character. Some examples follow:
 
210
<P>
 
211
<B>[a-zA-Z0-9]</B> or <B>[f-gF-G]</B> - character interval
 
212
<P>
 
213
<B>[abc]</B> - character enumeration
 
214
<P>
 
215
<B>[^abc]</B> or <B>[!abc]</B> - negation
 
216
<P>
 
217
<B>[[:</B><I>name</I><B>:]]</B> class expression. Supported classes are
 
218
<B>alnum</B>,<B>lower</B>, <B>space</B>, <B>alpha</B>, <B>digit</B>, <B>print</B>,
 
219
<B>upper</B>, <B>blank</B>, <B>graph</B>, <B>xdigit</B>.
 
220
<P>
 
221
<B>[][-!^]</B> - special case - matches only '-', ']', '[', '!' or '^'. These
 
222
characters have no special purpose.
 
223
<P>
 
224
<B>[\[\]\\]</B> - escape syntax. Matches '[', ']' or '\'.
 
225
<P>
 
226
Using the rules above, a file name pattern can be constructed:
 
227
<P>
 
228
ftp://example.com/some/path/[a-z[:upper:]\\].jpeg
 
229
</DL>
 
230
</DL>
 
231
 
 
232
</DL>
 
233
<P>
 
234
 
 
235
<P>
163
236
<A NAME="lbAH">&nbsp;</A>
164
237
<H2>Callback options</H2>
165
238
 
190
263
should return the actual number of bytes read, or '0' if you want to
191
264
stop the transfer.
192
265
<P>
 
266
If you stop the current transfer by returning 0 &quot;pre-maturely&quot; (i.e before
 
267
the server expected it, like when you've said you will upload N bytes and
 
268
you upload less than N bytes), you may experience that the server &quot;hangs&quot;
 
269
waiting for the rest of the data that won't come. 
 
270
<P>
 
271
Bugs: when doing TFTP uploads, you must return the exact amount of data
 
272
that the callback wants, or it will be considered the final packet by the
 
273
server end and the transfer will end there. 
 
274
<P>
193
275
<DT><B>-infile</B>
194
276
 
195
277
<DD>
199
281
 
200
282
<DD>
201
283
Name of the Tcl procedure that will invoked by TclCurl  with a frequent
202
 
interval during operation (roughly once per second), no matter if data
 
284
interval during operation (roughly once per second or sooner), no matter if data
203
285
is being transfered or not.  Unknown/unused
204
286
argument values passed to the callback will be set to zero (like if you
205
287
only download data, the upload size will remain 0), the prototype of the
227
309
only complete lines are written. Parsing headers should be easy enough using
228
310
this.
229
311
<P>
 
312
See also the headervar option to get the headers into an array.
 
313
<P>
230
314
<DT><B>-debugproc</B>
231
315
 
232
316
<DD>
242
326
1 incoming header, 2 outgoing header, 3 incoming data, 4 outgoing data,
243
327
5 incoming SSL data, 6 outgoing SSL data).
244
328
<P>
 
329
<DT><B>-chunkbgnproc</B>
 
330
 
 
331
<DD>
 
332
Name of the procedure that will be called before a file will be transfered by
 
333
ftp, it should match the following prototype:
 
334
<P>
 
335
<B>ChunkBgnProc {remains}</B>
 
336
 
 
337
<P>
 
338
<P>
 
339
Where remains is the number of files left to be transfered (or skipped)
 
340
<P>
 
341
This callback makes sense only when using the <B>-wildcard</B> option.
 
342
<P>
 
343
<DT><B>-chunkbgnvar</B>
 
344
 
 
345
<DD>
 
346
Name of the variable in the global scope that will contain the data of the file about
 
347
to be transfered. If you don't use this option '::fileData' will be used.
 
348
<P>
 
349
The available data is: filename, filetype (file, directory, symlink, device block, device char,
 
350
named pipe, socket, door or error if it couldn't be identified), time, perm, uid, gid, 
 
351
size, hardlinks and flags.
 
352
<P>
 
353
<DT><B>-chunkendproc</B>
 
354
 
 
355
<DD>
 
356
Name of the procedure that will be called after a file is transfered (or skipped) 
 
357
by ftp, it should match the following prototype:
 
358
<P>
 
359
<B>ChunkEndProc {}</B>
 
360
 
 
361
<P>
 
362
It should return '0' if everyhting is fine and '1' if some error occurred.
 
363
<P>
 
364
<DT><B>-fnmatchProc</B>
 
365
 
 
366
<DD>
 
367
Name of the procedure that will be called instead of the internal wildcard
 
368
matching function, it should match the following prototype:
 
369
<P>
 
370
<B>FnMatchProc {pattern string}</B>
 
371
 
 
372
<P>
 
373
Returns '0' if it matches, '1' if it doesn't.
 
374
<P>
245
375
</DL>
246
376
<A NAME="lbAI">&nbsp;</A>
247
377
<H2>Error Options</H2>
290
420
attempt to guess which protocol to use based on the given host name. If the
291
421
given protocol of the set URL is not supported, TclCurl will return the
292
422
<B>unsupported protocol</B> error when you call <B>perform</B>. Use
293
 
<B>curl::versioninfo</B> for detailed info on which protocols that are supported.
294
 
<P>
295
 
<B>NOTE</B>: this the one option required to be set
296
 
before
297
 
<B>perform</B>
298
 
 
299
 
is called.
 
423
<B>curl::versioninfo</B> for detailed info on which protocols are supported.
 
424
<P>
 
425
Starting with version 7.22.0, the fragment part of the URI will not be send as
 
426
part of the path, which was the case previously.
 
427
<P>
 
428
<B>NOTE</B>: this is the one option required to be set before <B>perform</B> is called.
 
429
<P>
 
430
<DT><B>-protocols</B>
 
431
 
 
432
<DD>
 
433
Pass a list in lowecase of protocols to limit what protocols TclCurl may use in the transfer. This
 
434
allows you to have a TclCurl built to support a wide range of protocols but still limit
 
435
specific transfers to only be allowed to use a subset of them. 
 
436
<P>
 
437
Accepted protocols are 'http', 'https', 'ftp', 'ftps', 'scp', 'sftp', 'telnet', 'ldap',
 
438
 
 
439
and 'all'.
 
440
<P>
 
441
<DT><B>-redirprotocols</B>
 
442
 
 
443
<DD>
 
444
Pass a list in lowercase of accepted protocols to limit what protocols TclCurl may use in a transfer
 
445
that it follows to in a redirect when <B>-followlocation</B> is enabled. This allows you
 
446
to limit specific transfers to only be allowed to use a subset of protocols in redirections.
 
447
<P>
 
448
By default TclCurl will allow all protocols except for FILE and SCP. This is a difference
 
449
compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported.
300
450
<P>
301
451
<DT><B>-proxy</B>
302
452
 
328
478
environment variables, include protocol prefix (<A HREF="http://)">http://)</A> and embedded
329
479
user + password.
330
480
<P>
 
481
Since 7.22.0, the proxy string may be specified with a protocol:// prefix to
 
482
specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
 
483
socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving)
 
484
to request the specific SOCKS version
 
485
to be used. No protocol specified, http:// and all others will be treated as
 
486
HTTP proxies.
 
487
<P>
331
488
<DT><B>-proxyport</B>
332
489
 
333
490
<DD>
334
491
Use this option to set the proxy port to use unless it is specified in
335
 
the proxy string by <B>-proxy</B>.
 
492
the proxy string by <B>-proxy</B>. If not specified, TclCurl will default
 
493
-to using port 1080 for proxies.
336
494
<P>
337
495
<DT><B>-proxytype</B>
338
496
 
339
497
<DD>
340
 
Pass the type of  the  proxy. Available options are 'http', 'socks4', 'socks4a'
341
 
and 'socks5', with the HTTP one being default.
 
498
Pass the type of  the  proxy. Available options are 'http', 'http1.0', 'socks4', 'socks4a',
 
499
<BLOCKQUOTE>man2html: unable to open or read file
 
500
 
 
501
</BLOCKQUOTE>
 
502
 
 
503
<P>
 
504
If you set it to <I>http1.0</I>, it will only affect how libcurl speaks to a proxy
 
505
when CONNECT is used. The HTTP version used for &quot;regular&quot; HTTP requests is instead
 
506
controled with <I>httpversion</I>.
 
507
<P>
 
508
<DT><B>-noproxy</B>
 
509
 
 
510
<DD>
 
511
Pass a string, a comma-separated list of hosts which do not use a proxy, if one
 
512
is specified. The only wildcard is a single * character, which matches all hosts,
 
513
and effectively disables the proxy. Each name in this list is matched as either
 
514
a domain which contains the hostname, or the hostname itself. For example, local.com
 
515
would match local.com, local.com:80, and www.local.com, but not http://www.notlocal.com.
342
516
<P>
343
517
<DT><B>-httpproxytunnel</B>
344
518
 
347
521
operations through the given HTTP proxy. Do note that there is a big
348
522
difference between using a proxy and tunneling through it. If you don't know what
349
523
this means, you probably don't want this tunnel option.
350
 
 
 
524
<P>
 
525
<DT><B>-socks5gssapiservice</B>
 
526
 
 
527
<DD>
 
528
Pass thee name of the service. The default service name for a SOCKS5 server is
 
529
rcmd/server-fqdn. This option allows you to change it.
 
530
<P>
 
531
<DT><B>-socks5gssapinec</B>
 
532
 
 
533
<DD>
 
534
Pass a 1 to enable or 0 to disable. As part of the gssapi negotiation a protection
 
535
mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but
 
536
the NEC reference implementation does not. If enabled, this option allows the
 
537
unprotected exchange of the protection mode negotiation.
351
538
<P>
352
539
<DT><B>-interface</B>
353
540
 
361
548
<DD>
362
549
This sets the local port number of the socket used for connection. This can
363
550
be used in combination with <B>-interface</B> and you are recommended to use
364
 
<B>localportrange</B> as well when this is set. Note the only valid port numbers
 
551
<B>localportrange</B> as well when this is set. Valid port numbers
365
552
are 1 - 65535.
366
553
<P>
367
554
<DT><B>-localportrange</B>
370
557
This is the number of attempts TclCurl should do to find a working local port
371
558
number. It starts with the given <B>-localport</B> and adds
372
559
one to the number for each retry. Setting this value to 1 or below will make
373
 
TclCurl do only one try for exact port number. Note that port numbers by nature
 
560
TclCurl do only one try for each port number. Port numbers by nature
374
561
are a scarce resource that will be busy at times so setting this value to something
375
562
too low might cause unnecessary connection setup failures.
376
563
<P>
381
568
of seconds. Set to '0' to completely disable caching, or '-1' to make the
382
569
cached entries remain forever. By default, TclCurl caches this info for 60 seconds.
383
570
<P>
 
571
The name resolve functions of various libc implementations don't re-read name
 
572
server information unless explicitly told so (for example, by calling
 
573
<BR>&nbsp;<I>res_init(3)</I>).&nbsp;This&nbsp;may&nbsp;cause&nbsp;TclCurl&nbsp;to&nbsp;keep&nbsp;using&nbsp;the&nbsp;older&nbsp;server&nbsp;even
 
574
if DHCP has updated the server info, and this may look like a DNS cache issue.
 
575
<P>
384
576
<DT><B>-dnsuseglobalcache</B>
385
577
 
386
578
<DD>
485
677
 
486
678
<DD>
487
679
Pass a string as parameter, which should be [username]:[password] to use for
488
 
the connection. Use <B>httpauth</B> to decide authentication method.
 
680
the connection. Use <B>-httpauth</B> to decide authentication method.
489
681
<P>
490
682
When using NTLM, you can set domain by prepending it to the user name and
491
683
separating the domain and name with a forward (/) or backward slash (\). Like
505
697
Pass a string as parameter, which should be [username]:[password] to use for
506
698
the connection to the HTTP proxy.
507
699
<P>
 
700
<DT><B>-username</B>
 
701
 
 
702
<DD>
 
703
Pass a string with the user name to use for the transfer. It sets the user name
 
704
to be used in protocol authentication. You should not use this option together
 
705
with the (older) <B>-userpwd</B> option.
 
706
<P>
 
707
In order to specify the password to be used in conjunction with the user name
 
708
use the <B>-password</B> option.
 
709
<P>
 
710
<DT><B>-password</B>
 
711
 
 
712
<DD>
 
713
Pass a string with the password to use for the transfer.
 
714
<P>
 
715
It should be used in conjunction with the <B>-username</B> option.
 
716
<P>
 
717
<DT><B>-proxyusername</B>
 
718
 
 
719
<DD>
 
720
Pass a string with the user name to use for the transfer while connecting to Proxy. 
 
721
<P>
 
722
It should be used in same way as the <B>-proxyuserpwd</B> is used, except that it
 
723
allows the username to contain a colon, like in the following example: 
 
724
&quot;sip:user@example.com&quot;. 
 
725
<P>
 
726
Note the <B>-proxyusername</B> option is an alternative way to set the user name
 
727
while connecting to Proxy. It doesn't make sense to use them together.
 
728
<P>
 
729
<DT><B>-proxypassword</B>
 
730
 
 
731
<DD>
 
732
Pass a string with the password to use for the transfer while connecting to Proxy. It
 
733
is meant to use together with <B>-proxyusername</B>.
 
734
<P>
508
735
<DT><B>-httpauth</B>
509
736
 
510
737
<DD>
526
753
way to do authentication over public networks than the regular
527
754
old-fashioned Basic method.
528
755
<P>
 
756
<DT><B>digestie</B>
 
757
 
 
758
<DD>
 
759
HTTP Digest authentication with an IE flavor. TclCurl will use a special
 
760
&quot;quirk&quot; that IE is known to have used before version 7 and that some
 
761
servers require the client to use.
 
762
<P>
529
763
<DT><B>gssnegotiate</B>
530
764
 
531
765
<DD>
541
775
It uses a challenge-response and hash concept similar to Digest, to prevent the
542
776
password from being eavesdropped.
543
777
<P>
 
778
<DT><B>ntlmwb</B>
 
779
 
 
780
<DD>
 
781
NTLM delegating to winbind helper. Authentication is performed by a separate
 
782
binary application that is executed when needed. The name of the application is
 
783
specified at libcurl's compile time but is typically /usr/bin/ntlm_auth.
 
784
<P>
 
785
Note that libcurl will fork when necessary to run the winbind application and kill
 
786
it when complete, calling waitpid() to await its exit when done. On POSIX operating
 
787
systems, killing the process will cause a SIGCHLD signal to be raised
 
788
(regardless of whether <B>-nosignal</B> is set). This behavior is subject to change
 
789
in future versions of libcurl. 
 
790
<P>
544
791
<DT><B>any</B>
545
792
 
546
793
<DD>
555
802
</DL>
556
803
 
557
804
<P>
 
805
<DT>Use it to tell TclCurl which authentication method(s) you want it to use for TLS authentication.<DD>
 
806
<DL COMPACT><DT><DD>
 
807
<DL COMPACT>
 
808
<DT><DT><B>tlsauthsrp</B>
 
809
 
 
810
<DD>
 
811
<DD>
 
812
TLS-SRP authentication. Secure Remote Password authentication for TLS is
 
813
defined in RFC 5054 and provides mutual authentication if both sides have a
 
814
shared secret. To use TLS-SRP, you must also set the
 
815
<B>-tlsauthusername</B> and <B>-tlsauthpassword</B> options.
 
816
<P>
 
817
You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
 
818
to work.
 
819
</DL>
 
820
</DL>
 
821
 
 
822
<P>
 
823
<DT><B>-tlsauthusername</B>
 
824
 
 
825
<DD>
 
826
Pass a string with the username to use for the TLS authentication method specified
 
827
with the <B>-tlsauthtype</B> option. Requires that the <B>-tlsauthpassword</B> option
 
828
also be set. 
 
829
<P>
 
830
<DT><B>-tlsauthpassword</B>
 
831
 
 
832
<DD>
 
833
Pass a string with the password to use for the TLS authentication method specified
 
834
with the <B>-tlsauthtype</B> option. Requires that the <B>-tlsauthusername</B> option
 
835
also be set. 
 
836
<P>
558
837
<DT><B>-proxyauth</B>
559
838
 
560
839
<DD>
595
874
encoding done by the server is ignored. See the special file
596
875
lib/README.encoding in libcurl docs for details.
597
876
<P>
 
877
<DT><B>-transferencoding</B>
 
878
 
 
879
<DD>
 
880
Adds a request for compressed Transfer Encoding in the outgoing HTTP
 
881
request. If the server supports this and so desires, it can respond with the
 
882
HTTP resonse sent using a compressed Transfer-Encoding that will be
 
883
automatically uncompressed by TclCurl on receival.
 
884
<P>
 
885
Transfer-Encoding differs slightly from the Content-Encoding you ask for with
 
886
<B>-encoding</B> in that a Transfer-Encoding is strictly meant to
 
887
be for the transfer and thus MUST be decoded before the data arrives in the
 
888
client. Traditionally, Transfer-Encoding has been much less used and supported
 
889
by both HTTP clients and HTTP servers.
 
890
<P>
598
891
<DT><B>-followlocation</B>
599
892
 
600
893
<DD>
603
896
 
604
897
that the server sends as part of a HTTP header.
605
898
<P>
606
 
<B>NOTE</B>: this means that the extension will re-send the  same
607
 
request on the new location and follow new <B>Location: headers</B>
608
 
all the way until no more such headers are returned.
609
 
<B>-maxredirs</B> can be used to limit the number of redirects
 
899
This means that the extension will re-send the  same request on the new location
 
900
and follow new <B>Location: headers</B> all the way until no more such headers are
 
901
returned. <B>-maxredirs</B> can be used to limit the number of redirects
610
902
TclCurl will follow.
611
903
<P>
 
904
Since 7.19.4, TclCurl can limit what protocols it will automatically follow.
 
905
The accepted protocols are set with <B>-redirprotocols</B> and it excludes the FILE
 
906
protocol by default.
 
907
<P>
612
908
<DT><B>-unrestrictedauth</B>
613
909
 
614
910
<DD>
629
925
<DT><B>-post301</B>
630
926
 
631
927
<DD>
632
 
An 1 tells TclCurl to respect RFC 2616/10.3.2 and not
633
 
convert POST requests into GET requests when following a 301 redirection. The
634
 
non-RFC behaviour is ubiquitous in web browsers, so the conversion is done
635
 
by default to maintain consistency. However, a server may require
636
 
a POST to remain a POST after such a redirection. This option is meaningful
637
 
only when setting <B>-followlocation</B>.
 
928
Controls how TclCurl acts on redirects after POSTs that get a 301 or 302 response back.
 
929
A &quot;301&quot; as parameter tells the TclCurl to respect RFC 2616/10.3.2 and not convert POST
 
930
requests into GET requests when following a 301 redirection. Passing a &quot;302&quot; makes
 
931
TclCurl maintain the request method after a 302 redirect. &quot;all&quot; is a convenience string
 
932
that activates both behaviours.
 
933
<P>
 
934
The non-RFC behaviour is ubiquitous in web browsers, so the extension does the conversion
 
935
by default to maintain consistency. However, a server may require a POST to remain a POST
 
936
after such a redirection.
 
937
<P>
 
938
This option is meaningful only when setting <B>-followlocation</B>
 
939
<P>
 
940
The option used to be known as <B>-post301</B>, which should still work but is know
 
941
deprecated.
638
942
<P>
639
943
<DT><B>-put</B>
640
944
 
644
948
<P>
645
949
This option is deprecated starting with version 0.12.1, you should use <B>-upload</B>.
646
950
<P>
 
951
This option does not limit how much data TclCurl will actually send, as that is
 
952
controlled entirely by what the read callback returns. 
 
953
<P>
647
954
<DT><B>-post</B>
648
955
 
649
956
<DD>
851
1158
Set multiple cookies in one string like this: &quot;name1=content1; name2=content2;&quot;
852
1159
etc.
853
1160
<P>
854
 
Note that this option sets the cookie header explictly in the outgoing request(s).
 
1161
This option sets the cookie header explictly in the outgoing request(s).
855
1162
If multiple requests are done due to authentication, followed redirections or similar,
856
1163
they will all get this cookie passed on.
857
1164
<P>
964
1271
<P>
965
1272
</DL>
966
1273
<A NAME="lbAM">&nbsp;</A>
 
1274
<H2>SMTP options</H2>
 
1275
 
 
1276
<P>
 
1277
<DL COMPACT>
 
1278
<DT><B>-mailfrom</B>
 
1279
 
 
1280
<DD>
 
1281
Pass a string to specify the sender address in a mail when sending an SMTP mail with TclCurl.
 
1282
<P>
 
1283
<DT><B>-mailrcpt</B>
 
1284
 
 
1285
<DD>
 
1286
Pass a list of recipients to pass to the server in your SMTP mail request.
 
1287
<P>
 
1288
Each recipient in SMTP lingo is specified with angle brackets (&lt;&gt;), but should you not use an
 
1289
angle bracket as first letter, TclCurl will assume you provide a single email address only and
 
1290
enclose that with angle brackets for you.
 
1291
<P>
 
1292
</DL>
 
1293
<A NAME="lbAN">&nbsp;</A>
 
1294
<H2>TFTP option</H2>
 
1295
 
 
1296
<P>
 
1297
<DL COMPACT>
 
1298
<DT><B>tftpblksize</B>
 
1299
 
 
1300
<DD>
 
1301
<P>
 
1302
Specify the block size to use for TFTP data transmission. Valid range as per RFC 2348 is 8-65464 bytes.
 
1303
The default of 512 bytes will be used if this option is not specified. The specified block size will
 
1304
only be used pending support by the remote server. If the server does not return an option acknowledgement
 
1305
or returns an option acknowledgement with no blksize, the default of 512 bytes will be used.
 
1306
<P>
 
1307
</DL>
 
1308
<A NAME="lbAO">&nbsp;</A>
967
1309
<H2>FTP options</H2>
968
1310
 
969
1311
<P>
978
1320
just a '-' to let the library use your systems default IP address. Default FTP
979
1321
operations are passive, and thus will not use PORT.
980
1322
<P>
 
1323
The address can be followed by a ':' to specify a port, optionally followed by a '-'
 
1324
o specify a port range. If the port specified is 0, the operating system will pick
 
1325
a free port. If a range is provided and all ports in the range are not available,
 
1326
libcurl will report CURLE_FTP_PORT_FAILED for the handle. Invalid port/range settings
 
1327
are ignored. IPv6 addresses followed by a port or portrange have to be in brackets.
 
1328
IPv6 addresses without port/range specifier can be in brackets.
 
1329
<P>
 
1330
Examples with specified ports:
 
1331
<P>
 
1332
<BR>&nbsp;&nbsp;eth0:0&nbsp;&nbsp;&nbsp;192.168.1.2:32000-33000&nbsp;&nbsp;&nbsp;curl.se:32123&nbsp;&nbsp;&nbsp;[::1]:1234-4567
 
1333
<P>
 
1334
You disable PORT again and go back to using the passive version by setting this option to
 
1335
an empty string.
 
1336
<P>
981
1337
<DT><B>-quote</B>
982
1338
 
983
1339
<DD>
986
1342
before the CWD command).If you do not want to transfer any files, set
987
1343
<B>nobody</B> to '1' and <B>header</B> to '0'.
988
1344
<P>
 
1345
Prefix the command with an asterisk (*) to make TclCurl continue even if the command
 
1346
fails as by default TclCurl will stop.
 
1347
<P>
 
1348
Disable this operation again by setting an empty string to this option.
 
1349
<P>
989
1350
Keep in mind the commands to send must be 'raw' ftp commands, for example, to
990
1351
create a directory you need to send <B>mkd Test</B>, not <B>mkdir Test</B>.
991
1352
<P>
1016
1377
only files in their response to NLST, they might not include subdirectories
1017
1378
and symbolic links.
1018
1379
<P>
 
1380
Setting this option to 1 also implies a directory listing even if the URL
 
1381
doesn't end with a slash, which otherwise is necessary.
 
1382
<P>
 
1383
Do NOT use this option if you also use <B>-wildcardmatch</B> as it will
 
1384
effectively break that feature.
 
1385
<P>
1019
1386
<DT><B>-append</B>
1020
1387
 
1021
1388
<DD>
1022
1389
A 1 parameter tells the extension to append to the remote file instead of
1023
1390
overwriting it. This is only useful when uploading to a ftp site.
1024
1391
<P>
1025
 
<DT><B>-ftpuseeprt</B>
 
1392
<DT><B>-ftpusepret</B>
1026
1393
 
1027
1394
<DD>
1028
1395
Set to 1 to tell TclCurl to use the EPRT (and LPRT) command when doing
1038
1405
first attempt to use EPSV before using PASV, but if you pass a zero to this
1039
1406
option, it will not try using EPSV, only plain PASV.
1040
1407
<P>
 
1408
<DT><B>-ftpusepret</B>
 
1409
 
 
1410
<DD>
 
1411
<P>
 
1412
Set to one to tell TclCurl to send a PRET command before PASV (and EPSV). Certain
 
1413
FTP servers, mainly drftpd, require this non-standard command for directory listings
 
1414
as well as up and downloads in PASV mode. Has no effect when using the active FTP
 
1415
transfers mode.
 
1416
<P>
1041
1417
<DT><B>-ftpcreatemissingdirs</B>
1042
1418
 
1043
1419
<DD>
1049
1425
creation will fail if a file of the same name as the directory to create
1050
1426
already exists or lack of permissions prevents creation.
1051
1427
<P>
 
1428
If set to 2, TclCurl will retry the CWD command again if the subsequent MKD
 
1429
command fails. This is especially useful if you're doing many simultanoeus
 
1430
connections against the same server and they all have this option enabled,
 
1431
as then CWD may first fail but then another connection does MKD before this
 
1432
connection and thus MKD fails but trying CWD works
 
1433
<P>
1052
1434
<DT><B>-ftpresponsetimeout</B>
1053
1435
 
1054
1436
<DD>
1077
1459
<P>
1078
1460
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
1079
1461
<P>
1080
 
<DT><B>-usessl</B>
1081
 
 
1082
 
<DD>
1083
 
You can use ftps:// URLs to explicitly switch on SSL/TSL for the control
1084
 
connection and the data connection.
1085
 
<P>
1086
 
Alternatively, and what seems to be the recommended way, you can set the
1087
 
option to one of these values:
1088
 
<P>
1089
 
<DL COMPACT><DT><DD>
1090
 
<DL COMPACT>
1091
 
<DT><B>nope</B>
1092
 
 
1093
 
<DD>
1094
 
Do not attempt to use SSL
1095
 
<DT><B>try</B>
1096
 
 
1097
 
<DD>
1098
 
Try using SSL, proceed anyway otherwise.
1099
 
<DT><B>control</B>
1100
 
 
1101
 
<DD>
1102
 
Use SSL for the control conecction or fail with &quot;use ssl failed&quot; (64).
1103
 
<DT><B>all</B>
1104
 
 
1105
 
<DD>
1106
 
Use SSL for all communication or fail with &quot;use ssl failed&quot; (64).
1107
 
</DL>
1108
 
</DL>
1109
 
 
1110
 
<P>
1111
1462
<DT><B>-ftpsslauth</B>
1112
1463
 
1113
1464
<DD>
1115
1466
Pass TclCurl one of the values from below, to alter how TclCurl issues
1116
1467
&quot;AUTH TLS&quot; or &quot;AUTH SSL&quot; when FTP over SSL is activated (see <B>-ftpssl</B>).
1117
1468
<P>
1118
 
You may need this option because of servers like BSDFTPD-SSL from
1119
 
<A HREF="http://bsdftpd-ssl.sc.ru/">http://bsdftpd-ssl.sc.ru/</A> &quot;which won't work properly  when &quot;AUTH SSL&quot; is issued
 
1469
You may need this option because of servers like <a href="http://bsdftpd-ssl.sc.ru/">BSDFTPD-SSL</A>
 
1470
which won't work properly  when &quot;AUTH SSL&quot; is issued
1120
1471
(although the server responds fine and everything) but requires &quot;AUTH TLS&quot;
1121
 
instead&quot;.
 
1472
instead.
1122
1473
<P>
1123
1474
<DL COMPACT><DT><DD>
1124
1475
<DL COMPACT>
1198
1549
 
1199
1550
<P>
1200
1551
</DL>
1201
 
<A NAME="lbAN">&nbsp;</A>
 
1552
<A NAME="lbAP">&nbsp;</A>
1202
1553
<H2>Protocol options</H2>
1203
1554
 
1204
1555
<P>
1228
1579
<DT><B>-crlf</B>
1229
1580
 
1230
1581
<DD>
1231
 
Convert unix newlines to CRLF newlines on FTP transfers.
 
1582
If set to '1', TclCurl converts Unix newlines to CRLF newlines on transfers. Disable
 
1583
this option again by setting the value to '0'.
1232
1584
<P>
1233
1585
<DT><B>-range</B>
1234
1586
 
1256
1608
For FTP, set this option to -1 to make the transfer start from the end of the
1257
1609
target file (useful to continue an interrupted upload). 
1258
1610
<P>
 
1611
When doing uploads with FTP, the resume position is where in the local/source
 
1612
file TclCurl should try to resume the upload from and it will then append the
 
1613
source file to the remote target file.
 
1614
<P>
1259
1615
<DT><B>-customrequest</B>
1260
1616
 
1261
1617
<DD>
1330
1686
<DD>
1331
1687
This defines how the <B>timevalue</B> value is treated. You can set this
1332
1688
parameter to <B>ifmodsince</B> or <B>ifunmodsince</B>.  This feature applies to
1333
 
HTTP and FTP.
 
1689
HTTP, FTP and FILE.
1334
1690
<P>
1335
1691
<DT><B>-timevalue</B>
1336
1692
 
1340
1696
<P>
1341
1697
<P>
1342
1698
</DL>
1343
 
<A NAME="lbAO">&nbsp;</A>
 
1699
<A NAME="lbAQ">&nbsp;</A>
1344
1700
<H2>Connection options</H2>
1345
1701
 
1346
1702
<P>
1412
1768
 
1413
1769
than before may cause open connections to unnecessarily get closed.
1414
1770
<P>
1415
 
<B>Note</B> that if you add this easy handle to a multi handle, this setting is not
 
1771
If you add this easy handle to a multi handle, this setting is not
1416
1772
being acknowledged, instead you must configure the multi handle its own
1417
1773
<B>maxconnects</B> option.
1418
1774
<P>
1459
1815
</DL>
1460
1816
 
1461
1817
<P>
1462
 
</DL>
1463
 
<A NAME="lbAP">&nbsp;</A>
 
1818
<DT><B>-resolve</B>
 
1819
 
 
1820
<DD>
 
1821
Pass a list of strings with host name resolve information to use for requests with
 
1822
this handle.
 
1823
<P>
 
1824
Each single name resolve string should be written using the format
 
1825
HOST:PORT:ADDRESS where HOST is the name TclCurl will try to resolve, PORT is
 
1826
the port number of the service where TclCurl wants to connect to the HOST and
 
1827
ADDRESS is the numerical IP address. If libcurl is built to support IPv6,
 
1828
ADDRESS can be either IPv4 or IPv6 style addressing.
 
1829
<P>
 
1830
This option effectively pre-populates the DNS cache with entries for the
 
1831
host+port pair so redirects and everything that operations against the
 
1832
HOST+PORT will instead use your provided ADDRESS.
 
1833
<P>
 
1834
You can remove names from the DNS cache again, to stop providing these fake
 
1835
resolves, by including a string in the linked list that uses the format
 
1836
&quot;-HOST:PORT&quot;. The host name must be prefixed with a dash, and the host name
 
1837
and port number must exactly match what was already added previously.
 
1838
<P>
 
1839
<DT><B>-usessl</B>
 
1840
 
 
1841
<DD>
 
1842
Pass a one of the values from below to make TclCurl use your desired level of SSL for the transfer.
 
1843
This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc.
 
1844
<P>
 
1845
You can use ftps:// URLs to explicitly switch on SSL/TSL for the control
 
1846
connection and the data connection.
 
1847
<P>
 
1848
Alternatively you can set the option to one of these values:
 
1849
<P>
 
1850
<DL COMPACT><DT><DD>
 
1851
<DL COMPACT>
 
1852
<DT><B>nope</B>
 
1853
 
 
1854
<DD>
 
1855
Do not attempt to use SSL
 
1856
<DT><B>try</B>
 
1857
 
 
1858
<DD>
 
1859
Try using SSL, proceed anyway otherwise.
 
1860
<DT><B>control</B>
 
1861
 
 
1862
<DD>
 
1863
Use SSL for the control conecction or fail with &quot;use ssl failed&quot; (64).
 
1864
<DT><B>all</B>
 
1865
 
 
1866
<DD>
 
1867
Use SSL for all communication or fail with &quot;use ssl failed&quot; (64).
 
1868
</DL>
 
1869
</DL>
 
1870
 
 
1871
<P>
 
1872
</DL>
 
1873
<A NAME="lbAR">&nbsp;</A>
1464
1874
<H2>SSL and security options</H2>
1465
1875
 
1466
1876
<P>
1472
1882
The default format is &quot;PEM&quot; and can be changed with <B>-sslcerttype</B>.
1473
1883
<P>
1474
1884
With NSS this is the nickname of the certificate you wish to authenticate with.
 
1885
If you want to use a file from the current directory, please precede it with the 
 
1886
&quot;./&quot; prefix, in order to avoid confusion with a nickname.
1475
1887
<P>
1476
1888
<DT><B>-sslcerttype</B>
1477
1889
 
1565
1977
alternate certificates with the <B>-cainfo</B> or the <B>-capath</B> options.
1566
1978
<P>
1567
1979
When <B>-sslverifypeer</B> is nonzero, and the verification fails to prove that the certificate
1568
 
is authentic, the connection fails. When the option is zero, the connection succeeds regardless. 
 
1980
is authentic, the connection fails. When the option is zero, the peer certificate verification
 
1981
succeeds regardless. 
1569
1982
<P>
1570
1983
Authenticating the certificate is not by itself very useful. You typically want to ensure
1571
1984
that the server, as authentically identified by its certificate, is the server you mean to
1572
 
be talking to, use <B>-sslverifyhost</B> to control that.
 
1985
be talking to, use <B>-sslverifyhost</B> to control that. The check that the host name in
 
1986
the certificate is valid for the host name you're connecting to is done
 
1987
independently of this option.
1573
1988
<P>
1574
1989
<DT><B>-cainfo</B>
1575
1990
 
1578
1993
makes sense when used in combination with the <B>-sslverifypeer</B> option, if
1579
1994
it is set to zero <B>-cainfo</B> need not even indicate an accessible file.
1580
1995
<P>
 
1996
This option is by default set to the system path where libcurl's cacert bundle
 
1997
is assumed to be stored, as established at build time.
 
1998
<P>
1581
1999
When built against NSS this is the directory that the NSS certificate database
1582
2000
resides in.
1583
2001
<P>
1597
2015
 
1598
2016
<DD>
1599
2017
Pass the directory holding multiple CA certificates to verify the peer with.
1600
 
The certificate directory must be prepared using the openssl c_rehash utility.
 
2018
If libcurl is built against OpenSSL, the certificate directory must be prepared
 
2019
using the openssl c_rehash utility.
1601
2020
This only makes sense when used in combination with the  <B>-sslverifypeer</B>
1602
2021
option, if it is set to zero, <B>-capath</B> need not even indicate an accessible
1603
2022
path.
1605
2024
This option apparently does not work in Windows due to some limitation in openssl.
1606
2025
<P>
1607
2026
This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
 
2027
NSS-powered libcurl provides the option only for backward compatibility.
1608
2028
<P>
1609
2029
<DT><B>-crlfile</B>
1610
2030
 
1620
2040
This option makes sense only when used in combination with the <B>-sslverifypeer</B>
1621
2041
option. 
1622
2042
<P>
1623
 
<DT><B>-randomfile</B>
1624
 
 
1625
 
<DD>
1626
 
Pass a file name. The file will be used to read from to seed the random engine
1627
 
for SSL. The more random the specified file is, the more secure will the SSL
1628
 
connection become.
1629
 
<P>
1630
 
<DT><B>-egdsocket</B>
1631
 
 
1632
 
<DD>
1633
 
Pass a path name to the Entropy Gathering Daemon socket. It will be used to seed
1634
 
the random engine for SSL.
 
2043
A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned
 
2044
when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate
 
2045
verification due to a revocation information found in the CRL does not trigger this specific
 
2046
error.
1635
2047
<P>
1636
2048
<DT><B>-sslverifyhost</B>
1637
2049
 
1657
2069
When the value is 0, the connection succeeds regardless of the names in
1658
2070
the certificate.
1659
2071
<P>
1660
 
The default is 2.
 
2072
The default value for this option is 2.
1661
2073
<P>
1662
2074
This option controls the identity that the server <I>claims</I>. The server
1663
 
could be lying. To control lying, see <B>sslverifypeer</B>.
 
2075
could be lying. To control lying, see <B>-sslverifypeer</B>. If libcurl is built
 
2076
against NSS and <B>-verifypeer</B> is zero, <B>-verifyhost</B> is ignored.
 
2077
<P>
 
2078
<DT><B>-certinfo</B>
 
2079
 
 
2080
<DD>
 
2081
Set to '1' to enable TclCurl's certificate chain info gatherer. With this enabled, TclCurl
 
2082
(if built with OpenSSL) will extract lots of information and data about the certificates
 
2083
in the certificate chain used in the SSL connection. This data can then be to extracted
 
2084
after a transfer using the <B>getinfo</B> command and its option <B>certinfo</B>.
 
2085
<P>
 
2086
<DT><B>-randomfile</B>
 
2087
 
 
2088
<DD>
 
2089
Pass a file name. The file will be used to read from to seed the random engine
 
2090
for SSL. The more random the specified file is, the more secure the SSL
 
2091
connection becomes.
 
2092
<P>
 
2093
<DT><B>-egdsocket</B>
 
2094
 
 
2095
<DD>
 
2096
Pass a path name to the Entropy Gathering Daemon socket. It will be used to seed
 
2097
the random engine for SSL.
1664
2098
<P>
1665
2099
<DT><B>-sslcypherlist</B>
1666
2100
 
1687
2121
 
1688
2122
<DD>
1689
2123
Pass a 0 to disable TclCurl's use of SSL session-ID caching or a 1 to enable it.
1690
 
By default all transfers are done using the cache. Note that while nothing ever
 
2124
By default all transfers are done using the cache. While nothing ever
1691
2125
should get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL
1692
2126
implementations in the wild that may require you to disable this in order for you to
1693
2127
succeed.
1701
2135
to NULL to disable kerberos4. Set the string to &quot;&quot; to disable kerberos
1702
2136
support for FTP.
1703
2137
<P>
 
2138
<DT><B>-gssapidelegation</B>
 
2139
 
 
2140
<DD>
 
2141
Set the option to 'flag' to allow unconditional GSSAPI credential delegation. The delegation
 
2142
is disabled by default since 7.21.7. Set the parameter to 'policyflag' to delegate only if
 
2143
the OK-AS-DELEGATE flag is set in the service ticket in case this feature is supported by the
 
2144
GSSAPI implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time.
 
2145
<P>
 
2146
<P>
1704
2147
</DL>
1705
 
<A NAME="lbAQ">&nbsp;</A>
 
2148
<A NAME="lbAS">&nbsp;</A>
1706
2149
<H2>SSH options</H2>
1707
2150
 
1708
2151
<P>
1745
2188
<DT><B>-publickeyfile</B>
1746
2189
 
1747
2190
<DD>
1748
 
Pass the file name for your public key. If not used, TclCurl defaults to using <B>~/.ssh/id_dsa.pub</B>.
 
2191
Pass the file name for your public key. If not used, TclCurl defaults to using <B>$HOME/.ssh/id_dsa.pub</B>.
 
2192
HOME environment variable is set, and just <B>id_dsa</B> in the current directory if not. 
1749
2193
<P>
1750
2194
<DT><B>-privatekeyfile</B>
1751
2195
 
1752
2196
<DD>
1753
 
Pass the file name for your private key. If not used, TclCurl defaults to using <B>~/.ssh/id_dsa</B>.
 
2197
Pass the file name for your private key. If not used, TclCurl defaults to using <B>$HOME/.ssh/id_dsa.pub</B>.
 
2198
HOME environment variable is set, and just <B>id_dsa</B> in the current directory if not.
1754
2199
If the file is password-protected, set the password with <B>-keypasswd</B>.
1755
2200
<P>
1756
 
</DL>
1757
 
<A NAME="lbAR">&nbsp;</A>
 
2201
<DT><B>-sshknownhosts</B>
 
2202
 
 
2203
<DD>
 
2204
Pass a string holding the file name of the known_host file to use. The known_hosts
 
2205
file should use the OpenSSH file format as supported by libssh2. If this file is
 
2206
specified, TclCurl will only accept connections with hosts that are known and present
 
2207
in that file, with a matching public key. Use <B>-sshkeyproc</B> to alter the default
 
2208
behavior on host and key (mis)matching.
 
2209
<P>
 
2210
<DT><B>-sshkeyproc </B>
 
2211
 
 
2212
<DD>
 
2213
Pass a the name of the procedure that will be called when the known_host matching has
 
2214
been done, to allow the application to act and decide for TclCurl how to proceed. The
 
2215
callback will only be called if <B>-knownhosts</B> is also set.
 
2216
<P>
 
2217
It gets passed a list with three elements, the first one is a list with the type of the
 
2218
key from the known_hosts file and the key itself, the second is another list with
 
2219
the type of the key from the remote site and the key itslef, the third tells you
 
2220
what TclCurl thinks about the matching status. 
 
2221
<P>
 
2222
The known key types are: &quot;rsa&quot;, &quot;rsa1&quot; and &quot;dss&quot;, in any other case &quot;unknown&quot; is given.
 
2223
<P>
 
2224
TclCurl opinion about how they match may be: &quot;match&quot;, &quot;mismatch&quot;, &quot;missing&quot; or &quot;error&quot;.
 
2225
<P>
 
2226
The procedure must return:
 
2227
<DL COMPACT><DT><DD>
 
2228
<DL COMPACT>
 
2229
<DT><B>0</B>
 
2230
 
 
2231
<DD>
 
2232
The host+key is accepted and TclCurl will append it to the known_hosts file before
 
2233
continuing with the connection. This will also add the host+key combo to the known_host
 
2234
pool kept in memory if it wasn't already present there. The adding of data to
 
2235
the file is done by completely replacing the file with a new copy, so the permissions of
 
2236
the file must allow this.
 
2237
<DT><B>1</B>
 
2238
 
 
2239
<DD>
 
2240
The host+key is accepted, TclCurl will continue with the connection. This will also add
 
2241
the host+key combo to the known_host pool kept in memory if it wasn't already present
 
2242
there.
 
2243
<DT><B>2</B>
 
2244
 
 
2245
<DD>
 
2246
The host+key is rejected. TclCurl will close the connection.
 
2247
<DT><B>3</B>
 
2248
 
 
2249
<DD>
 
2250
The host+key is rejected, but the SSH connection is asked to be kept alive. This feature
 
2251
could be used when the app wants to somehow return back and act on the host+key situation
 
2252
and then retry without needing the overhead of setting it up from scratch again.
 
2253
</DL>
 
2254
</DL>
 
2255
 
 
2256
<P>
 
2257
Any other value will cause the connection to be closed.
 
2258
<P>
 
2259
</DL>
 
2260
<A NAME="lbAT">&nbsp;</A>
1758
2261
<H2>Other options</H2>
1759
2262
 
1760
2263
<P>
1765
2268
Name of the Tcl array variable where TclCurl will store the headers returned
1766
2269
by the server.
1767
2270
<P>
1768
 
When a server sends a chunked encoded transfer, it may contain a
1769
 
trailer. That trailer is identical to a HTTP header and if such a trailer is
1770
 
received it is passed to the application using this callback as well. There
1771
 
are several ways to detect it being a trailer and not an ordinary header: 1)
1772
 
it comes after the response-body. 2) it comes after the final header line (CR
1773
 
LF) 3) a Trailer: header among the response-headers mention what header to
1774
 
expect in the trailer.
1775
 
<P>
1776
2271
<DT><B>-bodyvar</B>
1777
2272
 
1778
2273
<DD>
1804
2299
<DD>
1805
2300
Pass a number as a parameter, containing the value of the permissions that will
1806
2301
be assigned to newly created files on the remote server. The default value is 0644,
1807
 
but any valid value can be used. The only protocols that can use this are <A HREF="sftp://,">sftp://,</A>
1808
 
scp:// and <A HREF="file://.">file://.</A>
 
2302
but any valid value can be used. The only protocols that can use this are sftp://,
 
2303
scp:// and file://.
1809
2304
<P>
1810
2305
<DT><B>-newdirectoryperms</B>
1811
2306
 
1812
2307
<DD>
1813
2308
Pass a number as a parameter, containing the value of the permissions that will be
1814
2309
assigned to newly created directories on the remote server. The default value is 0755,
1815
 
but any valid value can be used. The only protocols that can use this are <A HREF="sftp://,">sftp://,</A> scp://
1816
 
and <A HREF="file://.">file://.</A>
1817
 
<P>
1818
 
</DL>
1819
 
<A NAME="lbAS">&nbsp;</A>
 
2310
but any valid value can be used. The only protocols that can use this are sftp://, scp://
 
2311
and file://.
 
2312
<P>
 
2313
</DL>
 
2314
<A NAME="lbAU">&nbsp;</A>
 
2315
<H2>Telnet options</H2>
 
2316
 
 
2317
<P>
 
2318
<DL COMPACT>
 
2319
<DT><B>-telnetoptions</B>
 
2320
 
 
2321
<DD>
 
2322
Pass a list with variables to pass to the telnet negotiations. The variables should be in
 
2323
the format &lt;option=value&gt;. TclCurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'.
 
2324
See the TELNET standard for details.
 
2325
<P>
 
2326
</DL>
 
2327
<A NAME="lbAV">&nbsp;</A>
1820
2328
<H2>NOT SUPPORTED</H2>
1821
2329
 
1822
2330
Some of the options libcurl offers are not supported, I don't think them
1830
2338
<B>CURLOPT_CONNECT_ONLY, CURLOPT_OPENSOCKETFUNCTION, CURLOPT_OPENSOCKETDATA.</B>
1831
2339
 
1832
2340
<P>
1833
 
<A NAME="lbAT">&nbsp;</A>
 
2341
<A NAME="lbAW">&nbsp;</A>
1834
2342
<H2>curlHandle perform</H2>
1835
2343
 
1836
2344
This procedure is called after the
1871
2379
Unsupported protocol. This build of TclCurl has no support for this protocol.
1872
2380
<DT>2<DD>
1873
2381
Very early initialization code failed. This is likely to be and internal error
1874
 
or problem.
 
2382
or a resource problem where something fundamental couldn't get done at init time.
1875
2383
<DT>3<DD>
1876
2384
URL malformat. The syntax was not correct.
 
2385
<DT>4<DD>
 
2386
A requested feature, protocol or option was not found built-in in this libcurl
 
2387
due to a build-time decision. This means that a feature or option was not
 
2388
enabled or explicitly disabled when libcurl was built and in order to get it
 
2389
to function you have to get a rebuilt libcurl.
1877
2390
<DT>5<DD>
1878
2391
Couldn't resolve proxy. The given proxy host could not be resolved.
1879
2392
<DT>6<DD>
1939
2452
SSL connect error. The SSL handshaking failed, the error buffer may have
1940
2453
a clue to the reason, could be certificates, passwords, ...
1941
2454
<DT>36<DD>
1942
 
FTP bad download resume. Couldn't continue an earlier aborted download, probably
1943
 
because you are trying to resume beyond the file size.
 
2455
The download could not be resumed because the specified offset was out of the
 
2456
file boundary.
1944
2457
<DT>37<DD>
1945
2458
A file given with FILE:// couldn't be read. Did you checked the permissions?
1946
2459
<DT>38<DD>
1959
2472
Too many redirects. When following redirects, TclCurl hit the maximum amount, set
1960
2473
your limit with --maxredirs
1961
2474
<DT>48<DD>
1962
 
Unknown TELNET option specified.
 
2475
An option passed to TclCurl is not recognized/known. Refer to the appropriate
 
2476
documentation. This is most likely a problem in the program that uses
 
2477
TclCurl. The error buffer might contain more specific information about which
 
2478
exact option it concerns.
1963
2479
<DT>49<DD>
1964
2480
A telnet option string was illegally formatted.
1965
2481
<DT>51<DD>
2008
2524
<DT>73<DD>
2009
2525
TFTP file already exists and will not be overwritten.
2010
2526
<DT>74<DD>
2011
 
No such user in the TFTP server and good behaving TFTP server
 
2527
No such user in the TFTP server and good behaving TFTP servers
2012
2528
should never return this.
2013
2529
<DT>75<DD>
2014
2530
Character conversion failed.
2024
2540
Failed to load CRL file
2025
2541
<DT>83<DD>
2026
2542
Issuer check failed
 
2543
<DT>84<DD>
 
2544
The FTP server does not understand the PRET command at all or does not support
 
2545
the given argument. Be careful when using <B>-customrequest</B>, a
 
2546
custom LIST command will be sent with PRET CMD before PASV as well.
 
2547
<DT>85<DD>
 
2548
Mismatch of RTSP CSeq numbers.
 
2549
<DT>86<DD>
 
2550
Mismatch of RTSP Session Identifiers.
 
2551
<DT>87<DD>
 
2552
Unable to parse FTP file list (during FTP wildcard downloading).
 
2553
<DT>88<DD>
 
2554
Chunk callback reported error.
2027
2555
<P>
2028
2556
</DL>
2029
 
<A NAME="lbAU">&nbsp;</A>
 
2557
<A NAME="lbAX">&nbsp;</A>
2030
2558
<H2>curlHandle getinfo option</H2>
2031
2559
 
2032
2560
Request internal information from the curl session with this procedure.
2145
2673
Returns the IP address of the most recent connection done with this handle.
2146
2674
This string may be IPv6 if that's enabled.
2147
2675
<P>
 
2676
<DT><B>primaryport</B>
 
2677
 
 
2678
<DD>
 
2679
Returns the destination port of the most recent connection done with this handle.
 
2680
<P>
 
2681
<DT><B>localip</B>
 
2682
 
 
2683
<DD>
 
2684
Returns the local (source) IP address of the most recent connection done
 
2685
with this handle. This string may be IPv6 if that's enabled.
 
2686
<P>
 
2687
<DT><B>localport</B>
 
2688
 
 
2689
<DD>
 
2690
Returns the local (source) port of the most recent connection done with this handle.
 
2691
<P>
2148
2692
<DT><B>sizeupload</B>
2149
2693
 
2150
2694
<DD>
2196
2740
Returns the content-length of the download. This is the value read from the
2197
2741
<B>Content-Length:</B>
2198
2742
 
2199
 
field.
 
2743
field. If the size isn't known, it returns -1.
2200
2744
<P>
2201
2745
<DT><B>contentlengthupload</B>
2202
2746
 
2225
2769
<DT><B>oserrno</B>
2226
2770
 
2227
2771
<DD>
2228
 
Returns the errno value from a connect failure.
 
2772
Returns the errno value from a connect failure. This value is only set on
 
2773
failure, it is no reset after a successfull operation.
2229
2774
<P>
2230
2775
<DT><B>cookielist</B>
2231
2776
 
2241
2786
TclCurl ended up in when logging on to the remote FTP server. Returns an empty
2242
2787
string if something is wrong.
2243
2788
<P>
 
2789
<DT><B>certinfo</B>
 
2790
 
 
2791
<DD>
 
2792
Returns list with information about the certificate chain, assuming you had the
 
2793
<B>-certinfo</B> option enabled when the previous request was done. The list
 
2794
first item reports how many certs it found and then you can extract info for each
 
2795
of those certs by following the list. The info chain is provided in a series of data
 
2796
in the format &quot;name:content&quot; where the content is for the specific named data.
 
2797
<P>
 
2798
NOTE: this option is only available in libcurl built with OpenSSL support.
 
2799
<P>
 
2800
<DT><B>conditionunmet</B>
 
2801
 
 
2802
<DD>
 
2803
Returns the number 1 if the condition provided in the previous request
 
2804
didn't match (see <I>timecondition</I>), you will get a zero if the condition
 
2805
instead was met.
 
2806
<P>
2244
2807
</DL>
2245
 
<A NAME="lbAV">&nbsp;</A>
 
2808
<A NAME="lbAY">&nbsp;</A>
2246
2809
<H2>curlHandle cleanup</H2>
2247
2810
 
2248
2811
This procedure must be the last one to call for a curl session. It is the
2257
2820
has kept open until now. Don't call this procedure if you intend to transfer
2258
2821
more files.
2259
2822
<P>
2260
 
<A NAME="lbAW">&nbsp;</A>
 
2823
<A NAME="lbAZ">&nbsp;</A>
2261
2824
<H2>curlHandle reset</H2>
2262
2825
 
2263
2826
<P>
2270
2833
It does not change the following information kept in the handle: live
2271
2834
connections, the Session ID cache, the DNS cache, the cookies and shares.
2272
2835
<P>
2273
 
<A NAME="lbAX">&nbsp;</A>
 
2836
<A NAME="lbBA">&nbsp;</A>
2274
2837
<H2>curlHandle duphandle</H2>
2275
2838
 
2276
2839
This procedure will return a new curl handle, a duplicate,
2288
2851
A new curl handle or an error message if the copy fails.
2289
2852
<P>
2290
2853
</DL>
2291
 
<A NAME="lbAY">&nbsp;</A>
 
2854
<A NAME="lbBB">&nbsp;</A>
2292
2855
<H2>curlHandle pause</H2>
2293
2856
 
2294
2857
You can use this command from within a progress callback procedure
2295
2858
to pause the transfer.
2296
2859
<P>
2297
 
<A NAME="lbAZ">&nbsp;</A>
 
2860
<A NAME="lbBC">&nbsp;</A>
2298
2861
<H2>curlHandle resume</H2>
2299
2862
 
2300
2863
Resumes a transfer paused with <B>curlhandle pause</B>
2301
2864
<P>
2302
 
<A NAME="lbBA">&nbsp;</A>
 
2865
<A NAME="lbBD">&nbsp;</A>
2303
2866
<H2>curl::transfer</H2>
2304
2867
 
2305
2868
In case you do not want to use persistant connections you can use this
2316
2879
The same error code <B>perform</B> would return.
2317
2880
<P>
2318
2881
</DL>
2319
 
<A NAME="lbBB">&nbsp;</A>
 
2882
<A NAME="lbBE">&nbsp;</A>
2320
2883
<H2>curl::version</H2>
2321
2884
 
2322
2885
Returns a string with the version number of tclcurl, libcurl and some of
2328
2891
The string with the version info.
2329
2892
<P>
2330
2893
</DL>
2331
 
<A NAME="lbBC">&nbsp;</A>
 
2894
<A NAME="lbBF">&nbsp;</A>
2332
2895
<H2>curl::escape url</H2>
2333
2896
 
2334
2897
This procedure will convert the given input string to an URL encoded string and
2341
2904
<DD>
2342
2905
The converted string.
2343
2906
</DL>
2344
 
<A NAME="lbBD">&nbsp;</A>
 
2907
<A NAME="lbBG">&nbsp;</A>
2345
2908
<H2>curl::unescape url</H2>
2346
2909
 
2347
2910
This procedure will convert the given URL encoded input string to a &quot;plain
2355
2918
The string unencoded.
2356
2919
<P>
2357
2920
</DL>
2358
 
<A NAME="lbBE">&nbsp;</A>
 
2921
<A NAME="lbBH">&nbsp;</A>
2359
2922
<H2>curl::curlConfig option</H2>
2360
2923
 
2361
2924
Returns some information about how you have
2388
2951
0c0d0e...
2389
2952
<P>
2390
2953
</DL>
2391
 
<A NAME="lbBF">&nbsp;</A>
 
2954
<A NAME="lbBI">&nbsp;</A>
2392
2955
<H2>curl::versioninfo option</H2>
2393
2956
 
2394
2957
Returns information about various run-time features in TclCurl.
2482
3045
makes libcurl use Windows-provided functions for NTLM authentication. It also
2483
3046
allows libcurl to use the current user and the current user's password without
2484
3047
the app having to pass them on.
 
3048
<DT><B>TLSAUTH_SRP</B>
 
3049
 
 
3050
<DD>
 
3051
Libcurl was built with support for TLS-SRP.
 
3052
<B>NTLM_WB</B>
 
3053
 
 
3054
Libcurl was built with support for NTLM delegation to a winbind helper.
2485
3055
</DL>
2486
3056
</DL>
2487
3057
 
2513
3083
in the list.
2514
3084
<P>
2515
3085
</DL>
2516
 
<A NAME="lbBG">&nbsp;</A>
 
3086
<A NAME="lbBJ">&nbsp;</A>
2517
3087
<H2>curl::easystrerror errorCode</H2>
2518
3088
 
2519
3089
This procedure returns a string describing the error code passed in the argument.
2520
3090
<P>
2521
 
<A NAME="lbBH">&nbsp;</A>
 
3091
<A NAME="lbBK">&nbsp;</A>
2522
3092
<H2>SEE ALSO</H2>
2523
3093
 
2524
 
<I>curl, <A HREF="http://curl.haxx.se/docs/httpscripting.html">The art of HTTP scripting</A> RFC 2396,</I>
 
3094
<I>curl, <a href="http://curl.haxx.se/docs/httpscripting.html">The art of HTTP scripting</A>, RFC 2396,</I>
2525
3095
 
2526
3096
<P>
2527
3097
 
2539
3109
<DT><A HREF="#lbAJ">Network options</A><DD>
2540
3110
<DT><A HREF="#lbAK">Names and Passwords options</A><DD>
2541
3111
<DT><A HREF="#lbAL">HTTP options</A><DD>
2542
 
<DT><A HREF="#lbAM">FTP options</A><DD>
2543
 
<DT><A HREF="#lbAN">Protocol options</A><DD>
2544
 
<DT><A HREF="#lbAO">Connection options</A><DD>
2545
 
<DT><A HREF="#lbAP">SSL and security options</A><DD>
2546
 
<DT><A HREF="#lbAQ">SSH options</A><DD>
2547
 
<DT><A HREF="#lbAR">Other options</A><DD>
2548
 
<DT><A HREF="#lbAS">NOT SUPPORTED</A><DD>
2549
 
<DT><A HREF="#lbAT">curlHandle perform</A><DD>
2550
 
<DT><A HREF="#lbAU">curlHandle getinfo option</A><DD>
2551
 
<DT><A HREF="#lbAV">curlHandle cleanup</A><DD>
2552
 
<DT><A HREF="#lbAW">curlHandle reset</A><DD>
2553
 
<DT><A HREF="#lbAX">curlHandle duphandle</A><DD>
2554
 
<DT><A HREF="#lbAY">curlHandle pause</A><DD>
2555
 
<DT><A HREF="#lbAZ">curlHandle resume</A><DD>
2556
 
<DT><A HREF="#lbBA">curl::transfer</A><DD>
2557
 
<DT><A HREF="#lbBB">curl::version</A><DD>
2558
 
<DT><A HREF="#lbBC">curl::escape url</A><DD>
2559
 
<DT><A HREF="#lbBD">curl::unescape url</A><DD>
2560
 
<DT><A HREF="#lbBE">curl::curlConfig option</A><DD>
2561
 
<DT><A HREF="#lbBF">curl::versioninfo option</A><DD>
2562
 
<DT><A HREF="#lbBG">curl::easystrerror errorCode</A><DD>
2563
 
<DT><A HREF="#lbBH">SEE ALSO</A><DD>
 
3112
<DT><A HREF="#lbAM">SMTP options</A><DD>
 
3113
<DT><A HREF="#lbAN">TFTP option</A><DD>
 
3114
<DT><A HREF="#lbAO">FTP options</A><DD>
 
3115
<DT><A HREF="#lbAP">Protocol options</A><DD>
 
3116
<DT><A HREF="#lbAQ">Connection options</A><DD>
 
3117
<DT><A HREF="#lbAR">SSL and security options</A><DD>
 
3118
<DT><A HREF="#lbAS">SSH options</A><DD>
 
3119
<DT><A HREF="#lbAT">Other options</A><DD>
 
3120
<DT><A HREF="#lbAU">Telnet options</A><DD>
 
3121
<DT><A HREF="#lbAV">NOT SUPPORTED</A><DD>
 
3122
<DT><A HREF="#lbAW">curlHandle perform</A><DD>
 
3123
<DT><A HREF="#lbAX">curlHandle getinfo option</A><DD>
 
3124
<DT><A HREF="#lbAY">curlHandle cleanup</A><DD>
 
3125
<DT><A HREF="#lbAZ">curlHandle reset</A><DD>
 
3126
<DT><A HREF="#lbBA">curlHandle duphandle</A><DD>
 
3127
<DT><A HREF="#lbBB">curlHandle pause</A><DD>
 
3128
<DT><A HREF="#lbBC">curlHandle resume</A><DD>
 
3129
<DT><A HREF="#lbBD">curl::transfer</A><DD>
 
3130
<DT><A HREF="#lbBE">curl::version</A><DD>
 
3131
<DT><A HREF="#lbBF">curl::escape url</A><DD>
 
3132
<DT><A HREF="#lbBG">curl::unescape url</A><DD>
 
3133
<DT><A HREF="#lbBH">curl::curlConfig option</A><DD>
 
3134
<DT><A HREF="#lbBI">curl::versioninfo option</A><DD>
 
3135
<DT><A HREF="#lbBJ">curl::easystrerror errorCode</A><DD>
 
3136
<DT><A HREF="#lbBK">SEE ALSO</A><DD>
2564
3137
</DL>
2565
3138
<HR>
2566
 
This document was created by man2html,
2567
 
using the manual pages.<BR>
 
3139
This document was created by man2html, using the manual pages.<BR>
2568
3140
</BODY>
2569
3141
</HTML>