summaryrefslogtreecommitdiffstats
path: root/tests/http.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-14 07:33:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-14 07:33:42 (GMT)
commit9a7583c2191aa650ad26a26ab89a94e644ac0240 (patch)
tree30a602b5e82e6c4be2a272103115d2f3ce5d992d /tests/http.test
parent4c0c6d80cd609403ceaf4f9c23984a42ab214d1d (diff)
downloadtcl-9a7583c2191aa650ad26a26ab89a94e644ac0240.zip
tcl-9a7583c2191aa650ad26a26ab89a94e644ac0240.tar.gz
tcl-9a7583c2191aa650ad26a26ab89a94e644ac0240.tar.bz2
Fix [fe57ad096d97623e]: Fix test http-4.14 for tcl-8.6.11rc0
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]
}
}