Skip to content

NoMethodError: undefined method `rpartition' for nil:NilClass #11

@everton

Description

@everton

When I access any URL (browser or curl) using the Rack::Session::Cookie it raises the exception:

NoMethodError at /
undefined method `rpartition' for nil:NilClass

            session_data, _, digest = cookie_data.rpartition('--')

file: rack-session-0.2.1/lib/rack/session/cookie.rb: in block in unpacked_cookie_data, line 229

Can be reproduced using the rack "hello, world" app:

require 'rack'
require 'rack/session'

use Rack::Session::Cookie,
  domain: '127.0.0.1:9292',
  expire_after: 3600*24,
  secret: '***********************unique secret key************************'

run ->(env) {
  [ 200,  { "Content-Type" => "text/html" }, [ "Hello World!" ]]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions