Tcl Source Code

Check-in [5f3ccedc8a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Document the new proc http::registerError in http.n
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-46b6edad51-concurrent-http
Files: files | file ages | folders
SHA3-256: 5f3ccedc8a0c56d27a3fe2ed8a6ab73bf98b2bb1409d0fcd140ed149dc677a0b
User & Date: kjnash 2018-04-20 20:06:30
Context
2018-04-21
13:31
Amend httpPipeline.test tests to use stdout not stderr, and thus avoid the report {Test files exitin... check-in: 2929e52c0a user: kjnash tags: bug-46b6edad51-concurrent-http
2018-04-20
20:06
Document the new proc http::registerError in http.n check-in: 5f3ccedc8a user: kjnash tags: bug-46b6edad51-concurrent-http
2018-04-13
15:48
Restore Tcl 8+4 tab convention check-in: 05ac4d0cdd user: kjnash tags: bug-46b6edad51-concurrent-http
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/http.n.

40
41
42
43
44
45
46


47
48
49
50
51
52
53
.sp
\fB::http::error \fItoken\fR
.sp
\fB::http::cleanup \fItoken\fR
.sp
\fB::http::register \fIproto port command\fR
.sp


\fB::http::unregister \fIproto\fR
.BE
.SH DESCRIPTION
.PP
The \fBhttp\fR package provides the client side of the HTTP/1.1
protocol, as defined in RFC 7230 to RFC 7235, which supersede RFC 2616.
The package implements the GET, POST, and HEAD operations







>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.sp
\fB::http::error \fItoken\fR
.sp
\fB::http::cleanup \fItoken\fR
.sp
\fB::http::register \fIproto port command\fR
.sp
\fB::http::registerError \fIport\fR ?\fImessage\fR?
.sp
\fB::http::unregister \fIproto\fR
.BE
.SH DESCRIPTION
.PP
The \fBhttp\fR package provides the client side of the HTTP/1.1
protocol, as defined in RFC 7230 to RFC 7235, which supersede RFC 2616.
The package implements the GET, POST, and HEAD operations
449
450
451
452
453
454
455











456
457
458
459
460
461
462
package require tls

::http::register https 443 ::tls::socket

set token [::http::geturl https://my.secure.site/]
.CE
.RE











.TP
\fB::http::unregister\fR \fIproto\fR
.
This procedure unregisters a protocol handler that was previously
registered via \fB::http::register\fR, returning a two-item list of
the default port and handler command that was previously installed
(via \fB::http::register\fR) if there was such a handler, and an error if







>
>
>
>
>
>
>
>
>
>
>







451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
package require tls

::http::register https 443 ::tls::socket

set token [::http::geturl https://my.secure.site/]
.CE
.RE
.TP
\fB::http::registerError\fR \fIport\fR ?\fImessage\fR?
.
This procedure allows a registered protocol handler to deliver an error
message for use by \fBhttp\fR.  Calling this command does not raise an
error. The command is useful when a registered protocol detects an problem
(for example, an invalid TLS certificate) that will cause an error to
propagate to \fBhttp\fR.  The command allows \fBhttp\fR to provide a
precise error message rather than a general one.  The command returns the
value provided by the last call with argument \fImessage\fR, or the empty
string if no such call has been made.
.TP
\fB::http::unregister\fR \fIproto\fR
.
This procedure unregisters a protocol handler that was previously
registered via \fB::http::register\fR, returning a two-item list of
the default port and handler command that was previously installed
(via \fB::http::register\fR) if there was such a handler, and an error if