summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/http/http.tcl5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 58bbee1..df8fe2d 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -760,9 +760,8 @@ proc http::geturl {url args} {
foreach {flag value} $args {
if {[regexp -- $pat $flag]} {
# Validate numbers
- if {
- [info exists type($flag)] &&
- ![string is $type($flag) -strict $value]
+ if {($flag eq "-headers") ? [catch {dict size $value}] :
+ ([info exists type($flag)] && ![string is $type($flag) -strict $value])
} {
unset $token
return -code error \