Skip to content

Commit 36b86c6

Browse files
committed
Avoid temporary array allocation.
1 parent e259845 commit 36b86c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

async-http.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
spec.add_dependency "io-endpoint", "~> 0.14"
3030
spec.add_dependency "io-stream", "~> 0.6"
3131
spec.add_dependency "protocol-http", "~> 0.43"
32-
spec.add_dependency "protocol-http1", ">= 0.28.1"
32+
spec.add_dependency "protocol-http1", "~> 0.29"
3333
spec.add_dependency "protocol-http2", "~> 0.22"
3434
spec.add_dependency "traces", "~> 0.10"
3535
spec.add_dependency "metrics", "~> 0.12"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module Protocol
1111
module HTTP1
1212
class Request < Protocol::Request
1313
def self.read(connection)
14-
if parts = connection.read_request
15-
self.new(connection, *parts)
14+
connection.read_request do |authority, method, target, version, headers, body|
15+
self.new(connection, authority, method, target, version, headers, body)
1616
end
1717
end
1818

0 commit comments

Comments
 (0)