Upgrade http.rb gem to 5.0.4.
Fixes a bug where the Foundation source strategy failed because http.rb automatically sent a `Content-Length: 0` header with all GET requests, which caused Foundation to return a 400 Bad Request error. This behavior was fixed in http.rb 5.x. http.rb 5.x has a breaking change where it now includes the request object inside the response object, which we have to handle in a few places.
This commit is contained in:
@@ -206,7 +206,7 @@ module Danbooru
|
||||
end
|
||||
|
||||
def fake_response(status)
|
||||
::HTTP::Response.new(status: status, version: "1.1", body: "")
|
||||
::HTTP::Response.new(status: status, version: "1.1", body: "", request: nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user