Skip to content

Commit

Permalink
Merge 66b6e6f into 971e4b8
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Jul 4, 2018
2 parents 971e4b8 + 66b6e6f commit 1e2fa41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/async/http/protocol/http11.rb
Expand Up @@ -241,7 +241,7 @@ def read_headers
fields = []

each_line do |line|
if line =~ /^([a-zA-Z\-]+):\s*(.+?)\s*$/
if line =~ /^([a-zA-Z\-\d]+):\s*(.+?)\s*$/
fields << [$1, $2]
else
break
Expand Down
4 changes: 2 additions & 2 deletions spec/async/http/protocol/http11_spec.rb
Expand Up @@ -29,7 +29,7 @@
subject {described_class.new(stream)}

describe "simple request" do
let(:request) {"GET / HTTP/1.1\r\nHost: localhost\r\nAccept: */*\r\n\r\n"}
let(:request) {"GET / HTTP/1.1\r\nHost: localhost\r\nAccept: */*\r\nHeader-0: value 1\r\n"}
let(:io) {StringIO.new(request)}

it "reads request" do
Expand All @@ -39,7 +39,7 @@
expect(method).to be == 'GET'
expect(url).to be == '/'
expect(version).to be == 'HTTP/1.1'
expect(headers).to be == {'accept' => ['*/*']}
expect(headers).to be == {'accept' => ['*/*'], "header-0" => ["value 1"]}
expect(body).to be nil
end
end
Expand Down

0 comments on commit 1e2fa41

Please sign in to comment.