SCRIPT_NAME is PATTERN (sorta)
- From:
- Zed A. Shaw
- Date:
- 2010-07-23 @ 19:12
Ok I closed bug:
http://mongrel2.org/tktview/756ec05599785887d608afaab5df12251cd05cb1
By implementing a new field you get on requests called PATTERN. Since
what each framework considers the "script name" can be different, it's
much more useful and generic to just hand back whatever full routing
pattern was matched for the request.
What will be in it is the pattern that was used, which could be:
/handlertest
or could be:
/test/(.*.json)
Processing it to make script name should be something like:
1. Find first (, truncate that and everything after.
2. Get the dirname for the remainder, that's your path prefix (script
name).
For example, with /handlertest this is '/' and for /test/(.*.json) this
is /test/.
Let me know how that works out for you.
--
Zed A. Shaw
http://zedshaw.com/