Sha256: 9bbd99381ead33c58820b24b512f2fba4330cd90a1a02f72338e3c552100a8e7

Contents?: true

Size: 551 Bytes

Versions: 38

Compression:

Stored size: 551 Bytes

Contents

module WEBrick
  class HTTPRequest
    alias_method :pact_original_meta_vars, :meta_vars

    def meta_vars
      original_underscored_headers = []
      self.each{|key, val| original_underscored_headers << key if key.include?("_") }
      # This header allows us to restore the original format (eg. underscored) of the headers
      # when parsing the incoming Rack env back to a response object.
      vars = pact_original_meta_vars
      vars["X_PACT_UNDERSCORED_HEADER_NAMES"] = original_underscored_headers.join(",")
      vars
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
pact-mock_service-3.12.3 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.12.2 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.12.1 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.12.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.11.2 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.11.1 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.11.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.10.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
hs-pact-mock_service-3.9.2 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.9.1 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.9.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.8.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.7.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.6.2 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.6.1 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.6.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.5.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.4.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.3.1 lib/pact/mock_service/server/webrick_request_monkeypatch.rb
pact-mock_service-3.3.0 lib/pact/mock_service/server/webrick_request_monkeypatch.rb