From ef25b88c45720980402e14e8fc515a2c10ca1abd Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 23 Sep 2020 17:14:50 +1000 Subject: [PATCH] feat(webhooks): remove user-agent and accept-encoding headers which the Ruby HTTP library adds by default --- lib/pact_broker/domain/webhook_request.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pact_broker/domain/webhook_request.rb b/lib/pact_broker/domain/webhook_request.rb index 92113a8fc..b914757e0 100644 --- a/lib/pact_broker/domain/webhook_request.rb +++ b/lib/pact_broker/domain/webhook_request.rb @@ -60,6 +60,8 @@ def execute def http_request @http_request ||= begin req = Net::HTTP.const_get(method.capitalize).new(uri.request_uri) + req.delete("accept-encoding") + req.delete("user-agent") headers.each_pair { | name, value | req[name] = value } req.basic_auth(username, password) if username && username.size > 0 req.body = body unless body.nil?