| |
1 |
1 |
# -*- tcl -*- $ |
| |
2 |
2 |
|
| |
3 |
|
set httpAccessVersion 0.92 |
| |
|
3 |
set httpAccessVersion 1.2 |
| |
4 |
4 |
package provide xotcl::comm::httpAccess $httpAccessVersion |
| |
5 |
5 |
|
| |
6 |
6 |
package require xotcl::comm::pcache |
| |
7 |
7 |
package require xotcl::comm::mime |
| |
8 |
|
package require xotcl::comm::connection |
| |
|
8 |
package require xotcl::comm::connection 1.2 |
| |
9 |
9 |
package require xotcl::trace |
| |
10 |
10 |
|
| |
11 |
11 |
package require XOTcl 2.0 |
| |
12 |
12 |
|
| |
13 |
13 |
namespace eval ::xotcl::comm::httpAccess { |
| |
14 |
14 |
namespace import ::xotcl::* |
| |
15 |
15 |
|
| |
16 |
16 |
variable os |
| |
17 |
17 |
variable VERSION |
| |
18 |
18 |
|
| |
19 |
19 |
if {[catch {set os [exec uname -sr]}]} { |
| |
20 |
20 |
if {[catch {set os [exec uname -a]}]} { set os unknownOS } |
| |
21 |
21 |
} |
| |
22 |
22 |
if {![info exists VERSION]} { set VERSION 1.0 } |
| |
23 |
23 |
|
| |
24 |
24 |
|
| |
25 |
25 |
# assert is used only for invariants in the source |
| |
26 |
26 |
proc assert {f r} { |
| |
27 |
27 |
set got [eval $f] |
| |
28 |
28 |
if {$got != $r} { |