Issue Details (XML | Word | Printable)

Key: JRUBY_RACK-39
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Nick Sieger
Reporter: karthikkrishnan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
jruby-rack

Public folder listing is displayed instead of Welcome page. Map.root is not observed

Created: 30/Nov/10 04:33 AM   Updated: 11/Feb/11 06:22 AM   Resolved: 11/Feb/11 06:22 AM
Component/s: None
Affects Version/s: 1.0.3, 1.0.4
Fix Version/s: 1.0.6

Time Tracking:
Not Specified

Environment:

java 1.6, jruby 1.5.5


Tags:


 Description  « Hide

After deploying a WAR file of my rails app, when accessing the server context root from browser, the default welcome page is not shown. Instead, the Folder Listing of the PUBLIC folder is displayed. This was working fine with JRUBY RACK - 1.0.1. And broken in 1.0.3.

I checked out using the latest trunk version (1.0.4-dev), the bug still exists.



karthikkrishnan added a comment - 30/Nov/10 04:42 AM

Wanted to add that we are using Rails 2.3


jeffContext added a comment - 30/Nov/10 06:49 PM

A workaround is to set jetty's dirAllowed init param to false. Though I'd be curious to know what changed between 1.0.1 and 1.0.3.

I'm using embedded jetty with a default WebAppContext. I didn't see an easy way to disable dirAllowed programmaticly, so I instead copied org/eclipse/jetty/webapp/webdefault.xml from the jar to my project, updated dirAllowed, and then told jetty to use it with:
myWebAppContext.setDefaultsDescriptor(updatedCopyOfDefaultWebXml);


Nick Sieger added a comment - 30/Nov/10 07:32 PM

Karthik, what server are you using? I did try to make some changes in 3bf46978 for Jetty servers, but if it was working before in 1.0.1 I'm a bit confused, as jeffContext says.

Can you try this jar file:

http://snapshots.repository.codehaus.org/org/jruby/rack/jruby-rack/1.0.4.dev-SNAPSHOT/jruby-rack-1.0.4.dev-20101130.193134-1.jar


Nick Sieger added a comment - 30/Nov/10 07:35 PM

Whoops, you said that the current trunk fails too. Any chance you can bisect back to a known working version?


karthikkrishnan added a comment - 01/Dec/10 09:21 AM

Nick, the behavior is fine with v1.0.1. Is that your question?


Nick Sieger added a comment - 08/Dec/10 07:12 PM

Karthik, just wondering if you can figure out what commit broke the behavior after the 1.0.1 release.

Also, what container and version are you using?


Nick Sieger added a comment - 11/Feb/11 06:22 AM

Think I fixed this in 1.0.6. Let's try it.