sinatra tips

request.env = {"GATEWAY_INTERFACE"=>"CGI/1.1", "PATH_INFO"=>"/requests/4eccb0b4931a5621dd000001/fulfill", "QUERY_STRING"=>"request%5Bstatus%5D=done&request%5Bcomment_body%5D=done+body", "REMOTE_ADDR"=>"127.0.0.1", "REMOTE_HOST"=>"localhost", "REQUEST_METHOD"=>"GET", "REQUEST_URI"=>"http://localhost:9292/requests/4eccb0b4931a5621dd000001/fulfill?request%5Bstatus%5D=done&request%5Bcomment_body%5D=done+body", "SCRIPT_NAME"=>"", "SERVER_NAME"=>"localhost", "SERVER_PORT"=>"9292", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)", "HTTP_HOST"=>"localhost:9292", "HTTP_CONNECTION"=>"keep-alive", "HTTP_REFERER"=>"http://localhost:9292/requests/4eccb0b4931a5621dd000001", "HTTP_USER_AGENT"=>"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30", "HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "HTTP_ACCEPT_ENCODING"=>"gzip,deflate,sdch", "HTTP_ACCEPT_LANGUAGE"=>"en-US,en;q=0.8", "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.3", "HTTP_COOKIE"=>"rack.session=0f8879fc2ccc379b520917522469aaa200c548eb9404854f874664f6e15e0139", "rack.version"=>[1, 1], "rack.input"=>#<Rack::Lint::InputWrapper:0xb986290 @input=#<StringIO:0xb98bbdc>>, "rack.errors"=>#<Rack::Lint::ErrorWrapper:0xb986254 @error=#<IO:<STDERR>>>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "rack.url_scheme"=>"http", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_PATH"=>"/requests/4eccb0b4931a5621dd000001/fulfill", "rack.logger"=>#<Logger:0xb9861c8 @progname=nil, @level=1, @default_formatter=#<Logger::Formatter:0xb9861b4 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0xb98618c @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<Rack::Lint::ErrorWrapper:0xb986254 @error=#<IO:<STDERR>>>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0xb986178 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0xb986128>>>>, "rack.session"=>{"__FLASH__"=>{}, "user_id"=>1}, "rack.session.options"=>{:key=>"rack.session", :path=>"/", :domain=>nil, :expire_after=>3600, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :namespace=>"rack:session", :memcache_server=>"localhost:11211", :id=>"0f8879fc2ccc379b520917522469aaa200c548eb9404854f874664f6e15e0139"}, "x-rack.flash"=>#<FlashHash @values={} @cache={}>, "rack.request.cookie_hash"=>{"rack.session"=>"0f8879fc2ccc379b520917522469aaa200c548eb9404854f874664f6e15e0139"}, "rack.request.cookie_string"=>"rack.session=0f8879fc2ccc379b520917522469aaa200c548eb9404854f874664f6e15e0139", "rack.request.query_string"=>"request%5Bstatus%5D=done&request%5Bcomment_body%5D=done+body", "rack.request.query_hash"=>{"request"=>{"status"=>"done", "comment_body"=>"done body"}}}

你可能感兴趣的:(Sinatra)