Skip to content

Commit 24f45d1

Browse files
committed
Use read_line implementation from protocol-http1.
1 parent 84a7016 commit 24f45d1

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

async-http.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
2727
spec.add_dependency "async", ">= 2.10.2"
2828
spec.add_dependency "async-pool", "~> 0.9"
2929
spec.add_dependency "io-endpoint", "~> 0.14"
30-
spec.add_dependency "io-stream", "~> 0.4"
30+
spec.add_dependency "io-stream", "~> 0.6"
3131
spec.add_dependency "protocol-http", "~> 0.37"
32-
spec.add_dependency "protocol-http1", "~> 0.27"
32+
spec.add_dependency "protocol-http1", ">= 0.28.1"
3333
spec.add_dependency "protocol-http2", "~> 0.19"
3434
spec.add_dependency "traces", "~> 0.10"
3535
spec.add_dependency "metrics", "~> 0.12"

lib/async/http/protocol/http1/connection.rb

-11
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ def http2?
4141
false
4242
end
4343

44-
def read_line?
45-
@stream.read_until(CRLF)
46-
rescue => error
47-
# Bascially, any error will cause the connection to be closed:
48-
return nil
49-
end
50-
51-
def read_line
52-
@stream.read_until(CRLF) or raise EOFError, "Could not read line!"
53-
end
54-
5544
def peer
5645
@stream.io
5746
end

0 commit comments

Comments
 (0)