Skip to content

Commit

Permalink
Update http-protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 5, 2019
1 parent a327803 commit beb3d6b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion async-http.gemspec
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion lib/async/http/protocol/http1/connection.rb
Expand Up @@ -44,7 +44,7 @@ def read_line
end

# @return [Async::Wrapper] the underlying non-blocking IO.
def hijack
def hijack!
@persistent = false

@stream.flush
Expand Down
4 changes: 2 additions & 2 deletions lib/async/http/protocol/http1/request.rb
Expand Up @@ -35,8 +35,8 @@ def hijack?
true
end

def hijack
@protocol.hijack
def hijack!
@protocol.hijack!
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/async/http/protocol/http11_spec.rb
Expand Up @@ -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" +
Expand Down
2 changes: 1 addition & 1 deletion spec/async/http/protocol/shared_examples.rb
Expand Up @@ -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
Expand Down

0 comments on commit beb3d6b

Please sign in to comment.