diff options
author | hobbs <hobbs> | 2001-09-07 00:03:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-09-07 00:03:08 (GMT) |
commit | 5fc06a7332a17e21c98691fdd8a3c9eaf82354ee (patch) | |
tree | 47368b22e97863dbd5d532cb02c96ce84b1a8df3 /tests | |
parent | 56b85d53e89fe89f7ea4416c45677e8f4630bc4e (diff) | |
download | tcl-5fc06a7332a17e21c98691fdd8a3c9eaf82354ee.zip tcl-5fc06a7332a17e21c98691fdd8a3c9eaf82354ee.tar.gz tcl-5fc06a7332a17e21c98691fdd8a3c9eaf82354ee.tar.bz2 |
* doc/http.n: noted -binary, charset and coding state keys.
* tests/http.test:
* library/http/pkgIndex.tcl:
* library/http/http.tcl (geturl): correctly get charset parameter
and convert text according to specified encoding (if known). RFC
iso8859-1 is used by default. Also recognize Content-encoding to
see if we should do binary translation. Added a CYA -binary
switch for the cases that were missed. [Bug #219211 #219399]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http.test | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/http.test b/tests/http.test index 70ca2f6..c0f7821 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.23 2001/08/07 00:42:30 hobbs Exp $ +# RCS: @(#) $Id: http.test,v 1.24 2001/09/07 00:03:08 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -99,16 +99,18 @@ test http-1.4 {http::config} { } {-accept */* -proxyfilter myFilter -proxyhost nowhere.come -proxyport 8080 -useragent {Tcl Test Suite}} test http-1.5 {http::config} { - catch {http::config -proxyhost {} -junk 8080} -} 1 + list [catch {http::config -proxyhost {} -junk 8080} msg] $msg +} {1 {Unknown option -junk, must be: -accept, -proxyfilter, -proxyhost, -proxyport, -useragent}} + test http-2.1 {http::reset} { catch {http::reset http#1} } 0 test http-3.1 {http::geturl} { - catch {http::geturl -bogus flag} -} 1 + list [catch {http::geturl -bogus flag} msg] $msg +} {1 {Unknown option flag, can be: -binary, -blocksize, -channel, -command, -handler, -headers, -progress, -query, -queryblocksize, -querychannel, -queryprogress, -validate, -timeout, -type}} + test http-3.2 {http::geturl} { catch {http::geturl http:junk} err set err @@ -464,6 +466,10 @@ test http-6.1 {http::ProxyRequired} { <h2>GET http://$url</h2> </body></html>" +test http-7.1 {http::mapReply} { + http::mapReply "abc\$\[\]\"\\()\}\{" +} {abc%24%5b%5d%22%5c%28%29%7d%7b} + # cleanup catch {unset url} catch {unset badurl} |