summaryrefslogtreecommitdiffstats
path: root/library/http/http.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/http/http.tcl')
-rw-r--r--library/http/http.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index eec05b8..df8fe2d 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -746,6 +746,7 @@ proc http::geturl {url args} {
-strict boolean
-timeout integer
-validate boolean
+ -headers dict
}
set state(charset) $defaultCharset
set options {
@@ -759,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 \