Method: Rack::PactBroker::ConvertFileExtensionToAcceptHeader#set_accept_header_and_path_info

Defined in:
lib/rack/pact_broker/convert_file_extension_to_accept_header.rb

#set_accept_header_and_path_info(env, file_extension) ⇒ Object



34
35
36
37
38
39
# File 'lib/rack/pact_broker/convert_file_extension_to_accept_header.rb', line 34

def set_accept_header_and_path_info env, file_extension
  env.merge(
    "PATH_INFO" => env["PATH_INFO"].gsub(EXTENSION_REGEXP, ''),
    "HTTP_ACCEPT" => EXTENSIONS[file_extension]
  )
end