diff options
author | dgp <dgp@users.sourceforge.net> | 2017-08-04 13:18:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-08-04 13:18:37 (GMT) |
commit | 3cf11a1ce9256625b71678d681e8e37d68cf1d24 (patch) | |
tree | d52a7830919499913481b17dd00e31e2c9e2baf9 /tests/httpd | |
parent | bb331bf1d89f77b744f8a757f3aeb28de48b6363 (diff) | |
parent | 735ca3d3a8dcc3e70c02259043f55853c0ac909c (diff) | |
download | tcl-3cf11a1ce9256625b71678d681e8e37d68cf1d24.zip tcl-3cf11a1ce9256625b71678d681e8e37d68cf1d24.tar.gz tcl-3cf11a1ce9256625b71678d681e8e37d68cf1d24.tar.bz2 |
merge 8.6
Diffstat (limited to 'tests/httpd')
-rw-r--r-- | tests/httpd | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/httpd b/tests/httpd index f15d71b..982f3b8 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}} { set s [socket -server httpdAccept $port] # Save the actual port number in a global variable. @@ -173,7 +180,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* { |