diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-18 04:20:13 +0800 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-12-20 04:00:53 +0800 |
commit | 59bd279ab832cda3a6cc43bfd9590c3008c58285 (patch) | |
tree | 12d590badd46e5f4f23bc9efeae7ab8f23c7a4eb | |
parent | 5ddd115c8156975281b6961237a0fc94a104659d (diff) | |
download | rack-59bd279ab832cda3a6cc43bfd9590c3008c58285.tar.gz |
parsing cookies with quotes works
-rw-r--r-- | test/spec_request.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/spec_request.rb b/test/spec_request.rb index f240be40..9f77f131 100644 --- a/test/spec_request.rb +++ b/test/spec_request.rb @@ -330,6 +330,18 @@ describe Rack::Request do req.cookies.should.equal 'foo' => 'bar' end + should 'parse cookies with quotes' do + req = Rack::Request.new Rack::MockRequest.env_for('', { + 'HTTP_COOKIE' => '$Version="1"; Customer="WILE_E_COYOTE"; $Path="/acme"; Part_Number="Rocket_Launcher_0001"; $Path="/acme"' + }) + req.cookies.should.equal({ + '$Version' => '"1"', + 'Customer' => '"WILE_E_COYOTE"', + '$Path' => '"/acme"', + 'Part_Number' => '"Rocket_Launcher_0001"', + }) + end + should "provide setters" do req = Rack::Request.new(e=Rack::MockRequest.env_for("")) req.script_name.should.equal "" |