Skip to content

Commit

Permalink
Added reader unknown_user and session_store
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Jun 21, 2017
1 parent 46f07d7 commit 48a5988
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sbsm/app.rb
Expand Up @@ -35,6 +35,7 @@ module SBSM
###
# App as a member of session
class App
attr_reader :unknown_user

def initialize()
SBSM.info "initialize"
Expand All @@ -43,6 +44,7 @@ def initialize()

class RackInterface
attr_accessor :session # thread variable!
attr_reader :session_store, :unknown_user
SESSION_ID = '_session_id'

# Base class for a SBSM based WebRick HTTP server
Expand Down Expand Up @@ -84,6 +86,7 @@ def initialize(app:,
unknown_user: unknown_user,
validator: validator,
multi_threaded: multi_threaded)
@unknown_user = unknown_user
end

def last_session
Expand Down Expand Up @@ -143,7 +146,6 @@ def call(env) ## mimick sbsm/lib/app.rb
response.set_cookie(key, { :value => value, :path => '/' })
end
response.set_cookie(SESSION_ID, { :value => session_id, :path => '/' }) unless request.cookies[SESSION_ID]

# response.set_cookie(SBSM::Session.get_cookie_name, session_id)
@@last_session = session
if response.headers['Set-Cookie'].to_s.index(session_id)
Expand Down

0 comments on commit 48a5988

Please sign in to comment.