On Thu, Oct 13, 2011 at 21:16, Nokan Emiro <[email protected]> wrote:
>
>> SCRIPT_NAME is the mount-path.
>> PATH_INFO is the internal app-path.
>>
>> So if you want your application available at xxx.com/my_app/, then the
>> request xxx.com/my_app/add will look like this:
>>
>>  SCRIPT_NAME="/my_app"
>>  PATH_INFO="/add"
>>
>> If it's available at xxx.com/, then xxx.com/add will look like this:
>>
>>  SCRIPT_NAME=""
>>  PATH_INFO="/add"
>>
>> Camping uses PATH_INFO for route dispatching and SCRIPT_NAME for route
>> generating.
>>
>> In this case you probably want to explicitly set SCRIPT_NAME to "".
>
> Thanks for these infos, it made everything clear.  Actually Camping
> is not working in this way.  My app has a whole domain, so it is
> the second case, where xxx.com/add is my Add controller's path.
> But I have to force "/" into SCRIPT_NAME to work.  If SCRIPT_NAME
> is empty, Camping generates strange values on R(Add).  Maybe
> this is a bug, I don't know, but this is what I discovered.

So you solved your problem? Good :-)

If you have some extra time, could you add this controller:

  class Debug < R '/debug-for-judofyr'
    def get
      [@env["PATH_INFO"], @env["SCRIPT_NAME"], R(Add)].inspect
    end
  end

… explicitly set SCRIPT_NAME to empty, and then report the result you
get at /debug-for-judofyr?
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to