summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-09-02 10:41:57 -0400
committerJesse Luehrs <doy@tozt.net>2013-09-02 10:53:53 -0400
commit39d3a137834aa90350e1947b734e003986bd5d78 (patch)
tree147d41d5229decd3089d2198587385f1cb55e9c2 /t
parent31a50c75661e9bb58026643cecc11e448544e80e (diff)
downloadweb-request-39d3a137834aa90350e1947b734e003986bd5d78.tar.gz
web-request-39d3a137834aa90350e1947b734e003986bd5d78.zip
fix uri escaping (backported from Plack 5f9c372)
Diffstat (limited to 't')
-rw-r--r--t/uri.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/uri.t b/t/uri.t
index 08aa584..e4bf438 100644
--- a/t/uri.t
+++ b/t/uri.t
@@ -45,6 +45,13 @@ my @tests = (
},
uri => 'http://example.com/exec/',
parameters => {} },
+
+ { add_env => {
+ HTTP_HOST => 'example.com',
+ SCRIPT_NAME => '/exec/'
+ },
+ uri => 'http://example.com/exec/',
+ parameters => {} },
{ add_env => {
SERVER_NAME => 'example.com'
},
@@ -87,7 +94,15 @@ my @tests = (
PATH_INFO => "/baz quux",
},
uri => 'http://example.com/foo%20bar/baz%20quux',
- parameters => {} }
+ parameters => {} },
+ { add_env => {
+ HTTP_HOST => 'example.com',
+ SCRIPT_NAME => "/path",
+ PATH_INFO => "/parameters;path=one,two",
+ QUERY_STRING => "query=foobar",
+ },
+ uri => 'http://example.com/path/parameters;path=one,two?query=foobar',
+ parameters => { query => "foobar" } },
);
for my $block (@tests) {