JRuby-Rack compatibilty issues with Camping
-------------------------------------------

                 Key: JRUBY-2859
                 URL: http://jira.codehaus.org/browse/JRUBY-2859
             Project: JRuby
          Issue Type: Bug
         Environment: Warbler 0.9.9, JRuby 1.1.3, JRuby-Rack 0.9
            Reporter: Robert
            Assignee: Thomas E Enebo
            Priority: Minor
         Attachments: adapter.rb

There seems to be an issue with either JRuby-rack's servlet handler or rack's 
Camping adapter:

1. Some of the enviroment variables are not picked up by Camping. This can be 
fixed by explicitly accessing all necessary entries to resolve the lazy 
references. Maybe using a lazy hash implementation is against the rack 
specification? ("The environment must be an true instance of Hash (no 
subclassing allowed) that includes CGI-like headers.")

2. Markaby uses method_missing magic heavily. This leads to strange exceptions:

WEB-INF/lib/markaby/builder.rb:284:in `each': yield called out of block 
(LocalJumpError)
        from 
/Users/robber/Downloads/apache-tomcat-6.0.16/webapps/camping/WEB-INF/lib/markaby/builder.rb:284:in
 `method_missing'
        from 
file:/Users/robber/Downloads/apache-tomcat-6.0.16/webapps/camping/WEB-INF/lib/jruby-rack-0.9.jar!/jruby/rack/servlet_helper.rb:58:in
 `write_body'
        from 
file:/Users/robber/Downloads/apache-tomcat-6.0.16/webapps/camping/WEB-INF/lib/jruby-rack-0.9.jar!/jruby/rack/servlet_helper.rb:35:in
 `respond'
        from 
file:/Users/robber/Downloads/apache-tomcat-6.0.16/webapps/camping/WEB-INF/lib/jruby-complete-1.1.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport/proxy/interface.rb:174:in
 `__jcreate_proxy!'

Again the workaround is simple: call to_s and put in an extra array. I have no 
idea why this is needed as the adapter runs fine on webrick / JRuby.

3. SCRIPT_NAME maybe broken (see attachment) but I could be wrong with this.

At this point I'm not sure if this is really a JRuby-rack issue, but it seems 
like it is.

Work-around camping adapter is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to