Skip to content

Const missing in JRuby scripting container  #234

@marekjelen

Description

@marekjelen

Clone Thick repo (git://github.com/marekjelen/thick.git) and checkout the "loader" branch

Install required gems (rack, rake, rspec, sinatra)

JRuby version:
jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_04) [darwin-x86_64-java]
jruby 1.7.0.preview1 (ruby-1.9.3-p203) (2012-05-19 00c8c98) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_04) [darwin-x86_64-java]


cd thick/example
jruby ../bin/thick -R

curl http://localhost:9292/

and the request end with const missing error.


Edit jruby-1.7.0.preview1/gems/rack-protection-1.2.0/lib/rack/protection.rb in the block remove starting "::" from names

    use Rack::Protection::FrameOptions,     options unless except.include? :frame_options
    use Rack::Protection::IPSpoofing,       options unless except.include? :ip_spoofing
    use Rack::Protection::JsonCsrf,         options unless except.include? :json_csrf
    use Rack::Protection::PathTraversal,    options unless except.include? :path_traversal
    use Rack::Protection::RemoteToken,      options unless except.include? :remote_token
    use Rack::Protection::SessionHijacking, options unless except.include? :session_hijacking
    use Rack::Protection::XSSHeader,        options unless except.include? :xss_header

restart the server and it ends with a different error in Sinatra.


The "extreme" use-case this happens (https://github.com/marekjelen/thick/blob/loader/lib/thick/loader.rb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions