Skip to content

Commit

Permalink
Fix thread-safety issue of http-rb (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkamel authored Sep 14, 2022
1 parent 8c3f148 commit f665fd7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# CHANGELOG

## v3.7.1

* Fix thread-safety issue of http-rb

## v3.7.0

* Add `SearchFlip::Connection#bulk` to allow more clean bulk indexing to
Expand Down
1 change: 1 addition & 0 deletions lib/search_flip/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class << self

def execute(method, uri, options = {})
final_request = plugins.inject(self) { |res, cur| cur.call(res, method, uri, options) }
final_request = final_request.headers({}) # Prevent thread-safety issue of http-rb: https://github.com/httprb/http/issues/558
response = final_request.request.send(method, uri, options)

raise SearchFlip::ResponseError.new(code: response.code, body: response.body.to_s) unless response.status.success?
Expand Down
2 changes: 1 addition & 1 deletion lib/search_flip/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SearchFlip
VERSION = "3.7.0"
VERSION = "3.7.1"
end

0 comments on commit f665fd7

Please sign in to comment.