diff options
Diffstat (limited to 'lib/yahns/http_client.rb')
-rw-r--r-- | lib/yahns/http_client.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb index 7a1bac1..d8154a4 100644 --- a/lib/yahns/http_client.rb +++ b/lib/yahns/http_client.rb @@ -190,10 +190,10 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc: true else # :lazy, false env = @hs.env - hdr_only = env['REQUEST_METHOD'] == 'HEAD'.freeze + opt = http_response_prep(env) res = k.app.call(env) return :ignore if app_hijacked?(env, res) - http_response_write(res, hdr_only) + http_response_write(res, opt) end end @@ -222,7 +222,7 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc: env['SERVER_PORT'] = '443'.freeze end - hdr_only = env['REQUEST_METHOD'] == 'HEAD'.freeze + opt = http_response_prep(env) # run the rack app res = k.app.call(env) return :ignore if app_hijacked?(env, res) @@ -232,7 +232,7 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc: end # this returns :wait_readable, :wait_writable, :ignore, or nil: - http_response_write(res, hdr_only) + http_response_write(res, opt) end # called automatically by kgio_write |