lib/hatetepe/client.rb in hatetepe-0.5.0.pre vs lib/hatetepe/client.rb in hatetepe-0.5.0.pre.1
- old
+ new
@@ -98,9 +98,13 @@
# @api public
def <<(request)
Fiber.new do
response = @app.call(request)
+ if response && request.verb == "HEAD"
+ response.body.close_write
+ end
+
if !response || response.failure?
request.fail(response)
else
request.succeed(response)
end