summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-04-21 12:44:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-04-21 12:44:30 (GMT)
commit7cfeb436e40fc160bf11579024635c4940cd8a64 (patch)
tree4d9a2148e53b39376869ce2c8884061555dc3468 /library
parent1212cb034f8cab80c2374092e810f483ee26f749 (diff)
parent2f99ece694f932e693cee1af4efff43b6d94beeb (diff)
downloadtcl-7cfeb436e40fc160bf11579024635c4940cd8a64.zip
tcl-7cfeb436e40fc160bf11579024635c4940cd8a64.tar.gz
tcl-7cfeb436e40fc160bf11579024635c4940cd8a64.tar.bz2
merge trunk
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 {} {