diff options
author | max <max@tclers.tk> | 2013-04-04 17:08:43 (GMT) |
---|---|---|
committer | max <max@tclers.tk> | 2013-04-04 17:08:43 (GMT) |
commit | ba5ae0ab74c4217f0a951b0eb3edf223022af5c5 (patch) | |
tree | a479f28ec1ec1dfebe670ae7fe82aa6f2d50d2b7 /tests | |
parent | ac66ecde08cacbe613154be42c2bc55c2a513435 (diff) | |
download | tcl-ba5ae0ab74c4217f0a951b0eb3edf223022af5c5.zip tcl-ba5ae0ab74c4217f0a951b0eb3edf223022af5c5.tar.gz tcl-ba5ae0ab74c4217f0a951b0eb3edf223022af5c5.tar.bz2 |
Allow URLs that don't have a path, but a query,
e.g. http://example.com?foo=bar and bump http to 2.7.12.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/http.test b/tests/http.test index 3ec0a6f..c974990 100644 --- a/tests/http.test +++ b/tests/http.test @@ -134,6 +134,7 @@ set fullurl http://user:pass@[info hostname]:$port/a/b/c set binurl //[info hostname]:$port/binary set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost +set authorityurl //[info hostname]:$port test http-3.4 {http::geturl} { set token [http::geturl $url] http::data $token @@ -351,6 +352,18 @@ User-Agent .* Connection close Content-Type {text/plain;charset=utf-8} Content-Length 5} +test http-3.30 {http::geturl query without path} -body { + set token [http::geturl $authorityurl?var=val] + http::ncode $token +} -cleanup { + catch { http::cleanup $token } +} -result 200 +test http-3.31 {http::geturl fragment without path} -body { + set token [http::geturl "$authorityurl#fragment42"] + http::ncode $token +} -cleanup { + catch { http::cleanup $token } +} -result 200 test http-4.1 {http::Event} { set token [http::geturl $url -keepalive 0] |