From 39d3a137834aa90350e1947b734e003986bd5d78 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 2 Sep 2013 10:41:57 -0400 Subject: fix uri escaping (backported from Plack 5f9c372) --- t/uri.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/uri.t b/t/uri.t index 08aa584..e4bf438 100644 --- a/t/uri.t +++ b/t/uri.t @@ -39,6 +39,13 @@ my @tests = ( }, uri => 'http://example.com/test?dynamic=daikuma', parameters => { dynamic => 'daikuma' } }, + { add_env => { + HTTP_HOST => 'example.com', + SCRIPT_NAME => '/exec/' + }, + uri => 'http://example.com/exec/', + parameters => {} }, + { add_env => { HTTP_HOST => 'example.com', SCRIPT_NAME => '/exec/' @@ -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) { -- cgit v1.2.3-54-g00ecf