joshbuddy/http_router_sinatra — Issue #2: Can't mount other sinatra apps
Author: hassox
Created: 2012-02-21 09:11:01+00:00
State: open

Hey Josh

I tried mounting some sinatra apps tonight according to how I thought it would behave with http_router. The routers were correctly joined, i.e. I could generate routes and see the url_mount points, but everytime I try to access one of the mounted routes, the action never goes through the sinatra code of the mounted app, and I get an empty response.

Here's an example of the expected behavior using http_router that works as expected:
https://gist.github.com/6d85220dda95b872d310

And the mounted sinatra apps that show the strange behaviour:
https://gist.github.com/84db1fe3c3833b19cb4b

If I hit "/one/foo", "/two/foo" etc I just get an empty response. I did try to go through the code, and I'll keep looking but so far nothing has jumped out at me as glaringly causing this issue.

Feel free to ping me :)

Cheers
Daniel