diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2016-10-08 16:41:51 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2016-10-08 16:41:51 (GMT) |
commit | 42bb1615c096d6485d36f6a07eab36f2e2e95b3b (patch) | |
tree | d5b3a9663302e1a59ba7aad9e0aa489de6650bf6 /tests | |
parent | be3376f36c02b2b317b509aed67b7751e656ecbb (diff) | |
parent | 0ac8f1e19818ac7aa6fd35de8e3190bcd24dcb6d (diff) | |
download | tcl-42bb1615c096d6485d36f6a07eab36f2e2e95b3b.zip tcl-42bb1615c096d6485d36f6a07eab36f2e2e95b3b.tar.gz tcl-42bb1615c096d6485d36f6a07eab36f2e2e95b3b.tar.bz2 |
[838e99a76d] Ensure that encodings are handled with application/xml and friends.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http.test | 8 | ||||
-rw-r--r-- | tests/httpd | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/http.test b/tests/http.test index 41820cb..12ad475 100644 --- a/tests/http.test +++ b/tests/http.test @@ -133,6 +133,7 @@ set tail /a/b/c set url //[info hostname]:$port/a/b/c set fullurl HTTP://user:pass@[info hostname]:$port/a/b/c set binurl //[info hostname]:$port/binary +set xmlurl //[info hostname]:$port/xml set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost set authorityurl //[info hostname]:$port @@ -431,6 +432,13 @@ Accept text/plain,application/tcl-test-value Accept-Encoding .* Content-Type application/x-www-form-urlencoded Content-Length 5} +# Bug 838e99a76d +test http-3.33 {http::geturl application/xml is text} -body { + set token [http::geturl "$xmlurl"] + scan [http::data $token] "<%\[^>]>%c<%\[^>]>" +} -cleanup { + catch { http::cleanup $token } +} -result {test 4660 /test} test http-4.1 {http::Event} -body { set token [http::geturl $url -keepalive 0] diff --git a/tests/httpd b/tests/httpd index c934fac..40e10df 100644 --- a/tests/httpd +++ b/tests/httpd @@ -171,6 +171,10 @@ proc httpdRespond { sock } { set html "$bindata[info hostname]:$port$data(url)" set type application/octet-stream } + *xml* { + set html [encoding convertto utf-8 "<test>\u1234</test>"] + set type "application/xml;charset=UTF-8" + } *post* { set html "Got [string length $data(query)] bytes" set type text/plain |