• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl/tcl/library/http/

Lines Matching +defs:http +defs:register

0 # http.tcl --
11 # RCS: @(#) $Id: http.tcl,v 1.67.2.9 2009/11/11 16:14:43 dgp Exp $
16 package provide http 2.7.5
18 namespace eval http {
21 variable http
22 if {![info exists http]} {
23 array set http {
27 -proxyfilter http::ProxyRequired
30 set http(-useragent) "Tcl http client package [package provide http]"
63 set urlTypes(http) [list 80 ::socket]
85 namespace export geturl config reset wait formatQuery register unregister
89 # http::Log --
97 proc http::Log {args} {}
99 # http::register --
110 proc http::register {proto port command} {
115 # http::unregister --
124 proc http::unregister {proto} {
134 # http::config --
143 proc http::config {args} {
144 variable http
145 set options [lsort [array names http -*]]
150 lappend result $name $http($name)
161 return $http($flag)
167 set http($flag) $value
172 # http::Finish --
187 proc http::Finish {token {errormsg ""} {skipCB 0}} {
216 # http::CloseSocket -
219 # possible an http token is included here but when we are called from a
223 proc ::http::CloseSocket {s {token {}}} {
259 # http::reset --
270 proc http::reset {token {why reset}} {
284 # http::geturl --
286 # Establishes a connection to a remote url via http.
289 # url The http URL to goget.
296 proc http::geturl {url args} {
297 variable http
306 if {![info exists http(uid)]} {
307 set http(uid) 0
309 set token [namespace current]::[incr http(uid)]
337 http ""
392 # First, before the colon, is the protocol scheme (e.g. http)
409 # http://jschmoe:xyzzy@www.bogus.net:8000/foo/bar.tml?q=foo#changes
411 # The "http" is the protocol, the user is "jschmoe", the password is
422 # done if $state(-strict) is true (inherited from $::http::strict).
501 set proto http
513 if {![catch {$http(-proxyfilter) $host} proxy]} {
538 [list http::reset $token timeout]]
598 fileevent $sock writable [list http::Connect $token]
599 http::wait $token
655 puts $sock "Accept: $http(-accept)"
668 puts $sock "User-Agent: $http(-useragent)"
740 fileevent $sock writable [list http::Write $token]
744 fileevent $sock readable [list http::Event $sock $token]
784 proc http::data {token} {
789 proc http::status {token} {
797 proc http::code {token} {
800 return $state(http)
802 proc http::ncode {token} {
805 if {[regexp {[0-9]{3}} $state(http) numeric_code]} {
808 return $state(http)
811 proc http::size {token} {
816 proc http::meta {token} {
821 proc http::error {token} {
830 # http::cleanup
835 # token The token returned from http::geturl
840 proc http::cleanup {token} {
848 # http::Connect
853 # token The token returned from http::geturl
859 proc http::Connect {token} {
875 # http::Write
885 proc http::Write {token} {
928 fileevent $sock readable [list http::Event $sock $token]
939 # http::Event
945 # token The token returned from http::geturl
950 proc http::Event {sock token} {
965 if {[catch {gets $sock state(http)} n]} {
976 if {$state(http) == "" || [lindex $state(http) 1] == 100} {
1149 # http::getTextLine --
1159 proc http::getTextLine {sock} {
1168 # http::CopyStart
1174 # token The token returned from http::geturl
1179 proc http::CopyStart {sock token} {
1184 [list http::CopyDone $token]
1190 # http::CopyDone
1195 # token The token returned from http::geturl
1201 proc http::CopyDone {token count {error {}}} {
1220 # http::Eof
1225 # token The token returned from http::geturl
1230 proc http::Eof {token {force 0}} {
1271 # http::wait --
1281 proc http::wait {token} {
1293 # http::formatQuery --
1295 # See documentation for details. Call http::formatQuery with an even
1305 proc http::formatQuery {args} {
1319 # http::mapReply --
1329 proc http::mapReply {string} {
1330 variable http
1337 if {$http(-urlencoding) ne ""} {
1338 set string [encoding convertto $http(-urlencoding) $string]
1351 # http::ProxyRequired --
1360 proc http::ProxyRequired {host} {
1361 variable http
1362 if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} {
1364 ![info exists http(-proxyport)] ||
1365 ![string length $http(-proxyport)]
1367 set http(-proxyport) 8080
1369 return [list $http(-proxyhost) $http(-proxyport)]
1373 # http::CharsetToEncoding --
1379 proc http::CharsetToEncoding {charset} {
1412 # http::Gunzip --
1418 proc http::Gunzip {data} {