summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormax <max@tclers.tk>2013-04-04 17:08:43 (GMT)
committermax <max@tclers.tk>2013-04-04 17:08:43 (GMT)
commite0dbb5bd6286d83d5bffb1ee2890569951dce5d4 (patch)
treea479f28ec1ec1dfebe670ae7fe82aa6f2d50d2b7 /tests
parentb5b700cbbdb4907a99eb6d6360be8c2cc0a01624 (diff)
downloadtcl-e0dbb5bd6286d83d5bffb1ee2890569951dce5d4.zip
tcl-e0dbb5bd6286d83d5bffb1ee2890569951dce5d4.tar.gz
tcl-e0dbb5bd6286d83d5bffb1ee2890569951dce5d4.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.test13
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]