From 6ac4baf44a7480a1147a764cca90ff974b866827 Mon Sep 17 00:00:00 2001 From: macournoyer Date: Thu, 15 May 2008 21:38:00 -0400 Subject: [PATCH] Add failing spec for absolute URL in request. --- spec/request/parser_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/request/parser_spec.rb b/spec/request/parser_spec.rb index 16b91aae..4e48f950 100644 --- a/spec/request/parser_spec.rb +++ b/spec/request/parser_spec.rb @@ -173,6 +173,18 @@ end end + xit "should parse absolute request URI" do + request = R(<<-EOS, true) +GET http://localhost:3000/hi HTTP/1.1 +Host: localhost:3000 + +EOS + request.env['PATH_INFO'].should == '/hi' + + request.should validate_with_lint + end + + it "should fails on heders larger then MAX_HEADER" do proc { R("GET / HTTP/1.1\r\nFoo: #{'X' * Request::MAX_HEADER}\r\n\r\n") }.should raise_error(InvalidRequest) end