diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2020-09-29 08:15:32 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2020-09-29 08:15:32 (GMT) |
commit | 43e27f10a51ad6b206f06c50ea0cd4653bba694a (patch) | |
tree | 0b0cdf09f3f9ef51aa78d2bd02005b7e2d5fde0b /library | |
parent | 38b30033c88080b592fdbc043f295bc9b4e97b5d (diff) | |
download | tcl-43e27f10a51ad6b206f06c50ea0cd4653bba694a.zip tcl-43e27f10a51ad6b206f06c50ea0cd4653bba694a.tar.gz tcl-43e27f10a51ad6b206f06c50ea0cd4653bba694a.tar.bz2 |
Ticket [0063cbcada]: check http::geturl -headers parameter to be a dict.
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index cce1828..abef596 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -733,6 +733,7 @@ proc http::geturl {url args} { -strict boolean -timeout integer -validate boolean + -headers list } set state(charset) $defaultCharset set options { @@ -747,8 +748,9 @@ proc http::geturl {url args} { if {[regexp -- $pat $flag]} { # Validate numbers if { - [info exists type($flag)] && - ![string is $type($flag) -strict $value] + ([info exists type($flag)] && + ![string is $type($flag) -strict $value]) || + $flag eq "-headers" && [llength $value] %2 != 0 } { unset $token return -code error \ |