summaryrefslogtreecommitdiffstats
path: root/tests/http.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http.test')
-rw-r--r--tests/http.test13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/http.test b/tests/http.test
index d1b2d22..c45a45a 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -38,13 +38,10 @@ proc bgerror {args} {
puts stderr $errorInfo
}
-if {$::tcl_platform(os) eq "Darwin"} {
- # Name resolution often a problem on OSX; not focus of HTTP package anyway
- set HOST localhost
-} else {
- set HOST [info hostname]
-}
-
+# Do not use [info hostname].
+# Name resolution is often a problem on OSX; not focus of HTTP package anyway.
+# Also a problem on other platforms for http-4.14 (test with bad port number).
+set HOST localhost
set port 8010
set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null"
catch {unset data}
@@ -81,6 +78,8 @@ if {[catch {package present Thread}] == 0 && [file exists $httpdFile]} {
unset port
return
} else {
+ # Running httpd in the current thread overwrites the values of port
+ # (here) and HOST (in the sourced server file).
set port [lindex [fconfigure $listen -sockname] 2]
}
}