summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-04-19 15:22:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-04-19 15:22:22 (GMT)
commit6133b6a8f367811422d9803a856fb5f3434ecce9 (patch)
tree5eacc06f21ebabe6f52778eb10ff19d91e67b58e /library
parentf7d320c03b32f0300e5430135fa74fcc4d979279 (diff)
parent681a97f23f6dac0cf64084ca04dfa2e9cd422114 (diff)
downloadtcl-6133b6a8f367811422d9803a856fb5f3434ecce9.zip
tcl-6133b6a8f367811422d9803a856fb5f3434ecce9.tar.gz
tcl-6133b6a8f367811422d9803a856fb5f3434ecce9.tar.bz2
merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl17
1 files changed, 13 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index ccd4cd1..03751a3 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -28,10 +28,19 @@ namespace eval http {
# We need a useragent string of this style or various servers will refuse to
# send us compressed content even when we ask for it. This follows the
# de-facto layout of user-agent strings in current browsers.
- set http(-useragent) "Mozilla/5.0\
- ([string totitle $::tcl_platform(platform)]; U;\
- $::tcl_platform(os) $::tcl_platform(osVersion))\
- http/[package provide http] Tcl/[package provide Tcl]"
+ # Safe interpreters do not have ::tcl_platform(os) or
+ # ::tcl_platform(osVersion).
+ if {[interp issafe]} {
+ set http(-useragent) "Mozilla/5.0\
+ (Windows; U;\
+ Windows NT 10.0)\
+ http/[package provide http] Tcl/[package provide Tcl]"
+ } else {
+ set http(-useragent) "Mozilla/5.0\
+ ([string totitle $::tcl_platform(platform)]; U;\
+ $::tcl_platform(os) $::tcl_platform(osVersion))\
+ http/[package provide http] Tcl/[package provide Tcl]"
+ }
}
proc init {} {