diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-09 11:04:49 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-09 11:04:49 (GMT) |
commit | 6379f60ed8aca0d3ce1aa00314d5249bf6da6f86 (patch) | |
tree | 1d794b8df6170032d664caa0398aecfd40ec1c4c /tests/http.test | |
parent | a286f72815078b57fa95179eb4dfdf75cc43e123 (diff) | |
download | tcl-6379f60ed8aca0d3ce1aa00314d5249bf6da6f86.zip tcl-6379f60ed8aca0d3ce1aa00314d5249bf6da6f86.tar.gz tcl-6379f60ed8aca0d3ce1aa00314d5249bf6da6f86.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.5.8.
Diffstat (limited to 'tests/http.test')
-rw-r--r-- | tests/http.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/http.test b/tests/http.test index 54fa369..7e40b82 100644 --- a/tests/http.test +++ b/tests/http.test @@ -135,6 +135,7 @@ set binurl //[info hostname]:$port/binary set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost set badcharurl //%user@[info hostname]:$port/a/^b/c +set authorityurl //[info hostname]:$port test http-3.4 {http::geturl} { set token [http::geturl $url] @@ -340,6 +341,19 @@ test http-3.25 {http::geturl parse failures} -body { set token [http::geturl $badcharurl] http::cleanup $token } -returnCodes ok -result {} +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] |