diff --git a/async-http.gemspec b/async-http.gemspec index 9fc07541..bccc51c6 100644 --- a/async-http.gemspec +++ b/async-http.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| spec.add_dependency("async", "~> 1.14") spec.add_dependency("async-io", "~> 1.18") - spec.add_dependency("http-protocol", "~> 0.15") + spec.add_dependency("http-protocol", "~> 0.17") # spec.add_dependency("openssl") diff --git a/lib/async/http/protocol/http1/connection.rb b/lib/async/http/protocol/http1/connection.rb index 50a3da43..f1a4a4c4 100755 --- a/lib/async/http/protocol/http1/connection.rb +++ b/lib/async/http/protocol/http1/connection.rb @@ -44,7 +44,7 @@ def read_line end # @return [Async::Wrapper] the underlying non-blocking IO. - def hijack + def hijack! @persistent = false @stream.flush diff --git a/lib/async/http/protocol/http1/request.rb b/lib/async/http/protocol/http1/request.rb index b66a0138..4f7bbd4d 100644 --- a/lib/async/http/protocol/http1/request.rb +++ b/lib/async/http/protocol/http1/request.rb @@ -35,8 +35,8 @@ def hijack? true end - def hijack - @protocol.hijack + def hijack! + @protocol.hijack! end end end diff --git a/spec/async/http/protocol/http11_spec.rb b/spec/async/http/protocol/http11_spec.rb index 04745ef5..dcc0a54f 100755 --- a/spec/async/http/protocol/http11_spec.rb +++ b/spec/async/http/protocol/http11_spec.rb @@ -50,7 +50,7 @@ let(:server) do Async::HTTP::Server.for(endpoint, protocol) do |request| - peer = request.hijack + peer = request.hijack! peer.write( "#{request.version} 200 It worked!\r\n" + diff --git a/spec/async/http/protocol/shared_examples.rb b/spec/async/http/protocol/shared_examples.rb index cb950120..011886ce 100644 --- a/spec/async/http/protocol/shared_examples.rb +++ b/spec/async/http/protocol/shared_examples.rb @@ -199,7 +199,7 @@ let(:server) do Async::HTTP::Server.for(endpoint, protocol) do |request| if request.hijack? - io = request.hijack + io = request.hijack! io.write "HTTP/1.1 200 Okay\r\nContent-Length: 16\r\n\r\nHijack Succeeded" io.flush io.close