File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/spec/ruby/rack/handler Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -969,6 +969,26 @@ def servlet.create_env(servlet_env)
969
969
rack_request . request_method . should == 'PUT'
970
970
end
971
971
972
+ it "does not truncate query strings containing semi-colons (Rack-compat)" do
973
+ servlet_request . setMethod 'GET'
974
+ servlet_request . setContextPath '/'
975
+ servlet_request . setPathInfo '/path'
976
+ servlet_request . setRequestURI '/home/path'
977
+ servlet_request . setQueryString 'foo=bar&quux=b;la'
978
+ # Query params :
979
+ servlet_request . addParameter ( 'foo' , 'bar' )
980
+ servlet_request . addParameter ( 'quux' , 'b;la' )
981
+
982
+ env = servlet . create_env ( servlet_env )
983
+ rack_request = Rack ::Request . new ( env )
984
+
985
+ rack_request . GET . should == { "foo" => "bar" , "quux" => "b;la" }
986
+ rack_request . POST . should == { }
987
+ rack_request . params . should == { "foo" => "bar" , "quux" => "b;la" }
988
+
989
+ rack_request . query_string . should == 'foo=bar&quux=b;la'
990
+ end
991
+
972
992
it "sets cookies from servlet requests" do
973
993
cookies = [ ]
974
994
cookies << javax . servlet . http . Cookie . new ( 'foo' , 'bar' )
You can’t perform that action at this time.
0 commit comments