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.tcl17
1 files changed, 12 insertions, 5 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 2a9c8b5..50ecdef 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: http.tcl,v 1.43.2.1 2003/07/18 19:41:16 hobbs Exp $
+# RCS: @(#) $Id: http.tcl,v 1.43.2.2 2003/09/29 10:04:53 dkf Exp $
# Rough version history:
# 1.0 Old http_get interface
@@ -255,6 +255,14 @@ proc http::geturl { url args } {
status ""
http ""
}
+ # These flags have their types verified [Bug 811170]
+ array set type {
+ -binary boolean
+ -blocksize integer
+ -queryblocksize integer
+ -validate boolean
+ -timeout integer
+ }
set state(charset) $defaultCharset
set options {-binary -blocksize -channel -command -handler -headers \
-progress -query -queryblocksize -querychannel -queryprogress\
@@ -265,11 +273,10 @@ proc http::geturl { url args } {
foreach {flag value} $args {
if {[regexp $pat $flag]} {
# Validate numbers
- if {[info exists state($flag)] && \
- [string is integer -strict $state($flag)] && \
- ![string is integer -strict $value]} {
+ if {[info exists type($flag)] && \
+ ![string is $type($flag) -strict $value]} {
unset $token
- return -code error "Bad value for $flag ($value), must be integer"
+ return -code error "Bad value for $flag ($value), must be $type($flag)"
}
set state($flag) $value
} else {