Sha256: c4b369489f446b4b2027bd479f768cffc313ac71e1df1ccceb9e9c467d5784ff
Contents?: true
Size: 511 Bytes
Versions: 2
Compression:
Stored size: 511 Bytes
Contents
module Grandstand class Session def initialize(app, session_key = '_session_id') @app = app @session_key = session_key end def call(env) if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ && env['PATH_INFO'] =~ /^\/grandstand\/galleries\/\d+\/images$/ params = Rack::Request.new(env).POST env['HTTP_COOKIE'] = [ @session_key, params.delete('session_key') ].join('=').freeze unless params['session_key'].nil? end @app.call(env) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
grandstand-0.2.7 | lib/grandstand/session.rb |
grandstand-0.2.6 | lib/grandstand/session.rb |