summaryrefslogtreecommitdiffstats
path: root/library/http
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-01-06 15:16:03 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-01-06 15:16:03 (GMT)
commit291d9e976b33feb8c31ee0cc01f647e03a7f3ec0 (patch)
treeb7e832068bb401efb3894e6908369656fd4f2774 /library/http
parent5e5871f6851802255905f7a97e321c195481344e (diff)
downloadtcl-291d9e976b33feb8c31ee0cc01f647e03a7f3ec0.zip
tcl-291d9e976b33feb8c31ee0cc01f647e03a7f3ec0.tar.gz
tcl-291d9e976b33feb8c31ee0cc01f647e03a7f3ec0.tar.bz2
Horrible hack to keep the old error message.
Diffstat (limited to 'library/http')
-rw-r--r--library/http/http.tcl12
1 files changed, 10 insertions, 2 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 3afa0e6..4c87fab 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.5 2005/01/06 11:34:20 dkf Exp $
+# RCS: @(#) $Id: http.tcl,v 1.43.2.6 2005/01/06 15:16:03 dkf Exp $
# Rough version history:
# 1.0 Old http_get interface
@@ -896,8 +896,16 @@ proc http::mapReply {string} {
if {$http(-urlencoding) ne ""} {
set string [encoding convertto $http(-urlencoding) $string]
+ return [string map $formMap $string]
}
- return [string map $formMap $string]
+ set converted [string map $formMap $string]
+ if {[string match "*\[\u0100-\uffff\]*" $converted]} {
+ regexp {[\u0100-\uffff]} $converted badChar
+ # Return this error message for maximum compatability... :^/
+ return -code error \
+ "can't read \"formMap($badChar)\": no such element in array"
+ }
+ return $converted
}
# http::ProxyRequired --