class ActionDispatch::Http::Headers

def []=(key, value)

Sets the given value for the key mapped to @env.
def []=(key, value)
  @req.set_header env_name(key), value
end