diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-01-06 15:16:03 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-01-06 15:16:03 (GMT) |
commit | bf282c8f70ba13fdbbfca301d5a15165865397e9 (patch) | |
tree | b7e832068bb401efb3894e6908369656fd4f2774 /library | |
parent | 2024466324531ec7c4d71b2619ca7b9e262cef07 (diff) | |
download | tcl-bf282c8f70ba13fdbbfca301d5a15165865397e9.zip tcl-bf282c8f70ba13fdbbfca301d5a15165865397e9.tar.gz tcl-bf282c8f70ba13fdbbfca301d5a15165865397e9.tar.bz2 |
Horrible hack to keep the old error message.
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 12 |
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 -- |