class Roda::RodaPlugins::RequestHeaders::Headers

  1. lib/roda/plugins/request_headers.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. []

Constants

CGI_VARIABLES = Set.new(%w' AUTH_TYPE CONTENT_LENGTH CONTENT_TYPE GATEWAY_INTERFACE HTTPS PATH_INFO PATH_TRANSLATED QUERY_STRING REMOTE_ADDR REMOTE_HOST REMOTE_IDENT REMOTE_USER REQUEST_METHOD SCRIPT_NAME SERVER_NAME SERVER_PORT SERVER_PROTOCOL SERVER_SOFTWARE ').freeze  

Set of environment variable names that don’t need HTTP_ prepended to them.

Public Class methods

new(env)
[show source]
   # File lib/roda/plugins/request_headers.rb
58 def initialize(env)
59   @env = env
60 end

Public Instance methods

[](key)

Returns the value for the given key mapped to @env

[show source]
   # File lib/roda/plugins/request_headers.rb
63 def [](key)
64   @env[env_name(key)]
65 end