summaryrefslogtreecommitdiffstats
path: root/tests/httpd
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-08-02 23:38:20 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-08-02 23:38:20 (GMT)
commit72396a1929d28c0d4eedf4a08a33c634a93a5172 (patch)
tree0822f642913e12bc9fec3d1717a1f39a48fa8f03 /tests/httpd
parentb095f046e62b83f50dd41996e1f0c69a0264934d (diff)
downloadtcl-72396a1929d28c0d4eedf4a08a33c634a93a5172.zip
tcl-72396a1929d28c0d4eedf4a08a33c634a93a5172.tar.gz
tcl-72396a1929d28c0d4eedf4a08a33c634a93a5172.tar.bz2
Fix weird hangs in macOS Sierra on some networks. Name resolution timeouts not what we want to test in the http package.
Diffstat (limited to 'tests/httpd')
-rw-r--r--tests/httpd9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/httpd b/tests/httpd
index 8753912..16e0382 100644
--- a/tests/httpd
+++ b/tests/httpd
@@ -10,6 +10,13 @@
#set httpLog 1
+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]
+}
+
proc httpd_init {{port 8015}} {
socket -server httpdAccept $port
}
@@ -168,7 +175,7 @@ proc httpdRespond { sock } {
switch -glob -- $data(url) {
*binary* {
- set html "$bindata[info hostname]:$port$data(url)"
+ set html "$bindata${::HOST}:$port$data(url)"
set type application/octet-stream
}
*xml* {