Skip to content

Instantly share code, notes, and snippets.

@gwincr11
Created September 3, 2014 04:27
Show Gist options
  • Save gwincr11/8dff3d22b3d66d62d25d to your computer and use it in GitHub Desktop.
Save gwincr11/8dff3d22b3d66d62d25d to your computer and use it in GitHub Desktop.
warden request issue
```ruby
[1] pry(#<Warden::Proxy>)> env
=> {"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/admin/news/new",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"localhost",
"REQUEST_METHOD"=>"GET",
"REQUEST_URI"=>"http://127.0.0.1:60474/admin/news/new",
"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"127.0.0.1",
"SERVER_PORT"=>"60474",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/2.0.0/2013-06-27)",
"HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34",
"HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"HTTP_CONNECTION"=>"Keep-Alive",
"HTTP_ACCEPT_ENCODING"=>"gzip",
"HTTP_ACCEPT_LANGUAGE"=>"en-US,*",
"HTTP_HOST"=>"127.0.0.1:60474",
"rack.version"=>[1, 2],
"rack.input"=>#<StringIO:0x007fde05164d70>,
"rack.errors"=>#<IO:<STDERR>>,
"rack.multithread"=>false,
"rack.multiprocess"=>false,
"rack.run_once"=>false,
"rack.url_scheme"=>"http",
"HTTP_VERSION"=>"HTTP/1.1",
"REQUEST_PATH"=>"/admin/news/new",
"ORIGINAL_FULLPATH"=>"/admin/news/new",
"ORIGINAL_SCRIPT_NAME"=>"",
"action_dispatch.routes"=>#<ActionDispatch::Routing::RouteSet:0x007fde01103e70>,
"action_dispatch.parameter_filter"=>[:password],
"action_dispatch.redirect_filter"=>[],
"action_dispatch.secret_token"=>nil,
"action_dispatch.secret_key_base"=>"19ad98d4c81b7c862ed0860ae8dfa05d0e02a84ebd168b27c738de8036204bb6cce490b995f29da713c49512897bcde24691b024c60851ce7d1550acae7906cc",
"action_dispatch.show_exceptions"=>false,
"action_dispatch.show_detailed_exceptions"=>true,
"action_dispatch.logger"=>
#<ActiveSupport::Logger:0x007fde0206ac88
@default_formatter=#<Logger::Formatter:0x007fde0206abe8 @datetime_format=nil>,
@formatter=#<ActiveSupport::Logger::SimpleFormatter:0x007fde030c2518 @datetime_format=nil>,
@level=0,
@logdev=
#<Logger::LogDevice:0x007fde0206aa80
@dev=#<File:/Users/corygwin/Documents/rails-projects/marinbikes.biz/log/test.log>,
@filename=nil,
@mutex=#<Logger::LogDevice::LogDeviceMutex:0x007fde0206a990 @mon_count=0, @mon_mutex=#<Mutex:0x007fde0206a8a0>, @mon_owner=nil>,
@shift_age=nil,
@shift_size=nil>,
@progname=nil>,
"action_dispatch.backtrace_cleaner"=>
#<Rails::BacktraceCleaner:0x007fde051f26c0
@filters=
[#<Proc:0x007fde051f04b0@/Users/corygwin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/backtrace_cleaner.rb:10>,
#<Proc:0x007fde051f0410@/Users/corygwin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/backtrace_cleaner.rb:11>,
#<Proc:0x007fde051f03e8@/Users/corygwin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/backtrace_cleaner.rb:12>,
#<Proc:0x007fde051fe1f0@/Users/corygwin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/backtrace_cleaner.rb:24>],
@silencers=[#<Proc:0x007fde051fe1c8@/Users/corygwin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/backtrace_cleaner.rb:15>]>,
"action_dispatch.key_generator"=>
#<ActiveSupport::CachingKeyGenerator:0x007fde051fe0d8
@cache_keys=
#<ThreadSafe::Cache:0x007fde051fe088
@backend=
{"encrypted cookie64"=>
"P\xAEI\f\xA4m\xBB\xE8\x12\xA1\xE2\x8B\x9E\x8A\x96\xD0\xFC|*f\xA5\x18v\xAD\xA6\xE8O\xD0w\x14\x17S\x9D\xE2\xB9\xC2\xA3\xE6?\v\x01:\xA8\xB5\x8A\xCA\xB3\f\xD6V\" 2[\xD39\xC3\r\x1C=\xC8\xC3\x83\xC1",
"signed encrypted cookie64"=>
"@\xFFI\x01\x86\xAC\x88\xEF\xA0\xAC\ao5\r\x87\xE2\xF6BP\xD4\x15\xE7\xD3\xA7c\x97'\x10\xA6\x9C\xAFT9\xF8\xF3\x9A\x93\xAC\xD9\xAC\xF0,\xA2\x02L\x97\x02\x00SJ\xB5\x8B[BR\x8C\x12B,\xC7B\x836\xA5"},
@default_proc=nil>,
@key_generator=
#<ActiveSupport::KeyGenerator:0x007fde051fe100
@iterations=1000,
@secret="19ad98d4c81b7c862ed0860ae8dfa05d0e02a84ebd168b27c738de8036204bb6cce490b995f29da713c49512897bcde24691b024c60851ce7d1550acae7906cc">>,
"action_dispatch.http_auth_salt"=>"http authentication",
"action_dispatch.signed_cookie_salt"=>"signed cookie",
"action_dispatch.encrypted_cookie_salt"=>"encrypted cookie",
"action_dispatch.encrypted_signed_cookie_salt"=>"signed encrypted cookie",
"ROUTES_70295738654520_SCRIPT_NAME"=>"",
"action_dispatch.request_id"=>"04d8004a-bd78-47e3-8545-086058c0316e",
"action_dispatch.remote_ip"=>
#<ActionDispatch::RemoteIp::GetIp:0x007fde0520f7c0
@check_ip=true,
@env={...},
@proxies=
/
^127\.0\.0\.1$ | # localhost IPv4
^::1$ | # localhost IPv6
^fc00: | # private IPv6 range fc00
^10\. | # private IPv4 range 10.x.x.x
^172\.(1[6-9]|2[0-9]|3[0-1])\.| # private IPv4 range 172.16.0.0 .. 172.31.255.255
^192\.168\. # private IPv4 range 192.168.x.x
/x>,
"rack.session"=>#<ActionDispatch::Request::Session:0x007fde03580d20 ...>,
"rack.session.options"=>
#<ActionDispatch::Request::Session::Options:0x007fde03580898
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment