class Rack::Test::Session
def header(name, value)
environment hash in HTTP_USER_AGENT form. Example:
In accordance with the Rack spec, headers will be included in the Rack
session. Use a value of nil to remove a previously configured header.
Set a header to be included on all subsequent requests through the
def header(name, value) name = name.upcase name.tr!('-', '_') name = "HTTP_#{name}" unless name == 'CONTENT_TYPE' || name == 'CONTENT_LENGTH' env(name, value) end