Skip to content

Commit

Permalink
kinda spec fail there: host is also required to reconstruct the url, …
Browse files Browse the repository at this point in the history
…but is not required by the spec
  • Loading branch information
jonasschneider committed Jan 3, 2012
1 parent a5ab35c commit 393fffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/momentum/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Request
RACK_RUN_ONCE = 'rack.run_once'.freeze
RACK_SCHEME = 'rack.url_scheme'.freeze

REQUIRED = %w(method url version) # Todo draft 3: don't use :url
REQUIRED = %w(method url version host) # Todo draft 3: don't use :url

# spdy_info[:headers] is a hash mapping strings to strings, containing the http headers from the SPDY request.
# spdy_info[:remote_addr] is the remote IP address
Expand Down
2 changes: 1 addition & 1 deletion spec/momentum/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe Momentum::Request do
let(:valid_headers) { { 'method' => 'get', 'version' => 'HTTP/1.1', 'url' => '/test.css', 'host' => 'titan:5555', 'scheme' => 'http' } }
%w(method url version).each do |header|
%w(method url version host).each do |header|
it "raises when :#{header} is missing" do
valid_headers.delete header
lambda {
Expand Down

0 comments on commit 393fffc

Please sign in to comment.