Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
[#872] Avoid calling broken Curl::Easy#http_put until Newrelic fix this
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyza committed Sep 19, 2013
1 parent 1341e9e commit 5548209
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tire/http/clients/curb.rb
Expand Up @@ -38,9 +38,13 @@ def self.post(url, data)
Response.new client.body_str, client.response_code
end

# NOTE: newrelic_rpm breaks Curl::Easy#http_put
# https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/instrumentation/curb.rb#L49
#
def self.put(url, data)
method = client.respond_to?(:http_put_without_newrelic) ? :http_put_without_newrelic : :http_put
client.url = url
client.http_put data
client.send method, data
Response.new client.body_str, client.response_code
end

Expand Down

0 comments on commit 5548209

Please sign in to comment.