On Feb 3, 2012, at 10:38 AM, VP wrote:
> My personal pc is Mac Leopard Python 2.7.2. The parsing works as
> expected on this pc.
>
> The server is Debian squeeze, ngnix, uwsgi, Python 2.6.6. The parsing
> messed up as described above.
Looking at the parametric router code, I don't see any logic that could cause
what you're seeing (it basically does a split('/') on the args portion of the
URL); I believe that the default and pattern-based router handlers do
essentially the same thing. The BEAUTIFY trick below is intended to tell us
whether nginx or something else might be doing something with the URL before
web2py gets it.
>
>
>
> On Feb 3, 12:00 pm, Jonathan Lundell <[email protected]> wrote:
>> On Feb 3, 2012, at 9:46 AM, VP wrote:
>>
>>> Yes, I did restart and incorporated your fix. It still doesn't work.
>>
>>> I don't think it has to do with routes.py
>>
>> Curious. What are the operating systems and Python versions on the working
>> and non-working systems? I think the most productive course right now is to
>> see what's different.
>>
>> Another thing that might help is to put =BEAUTIFY(request) into a template
>> somewhere and compare the two when given URLs of the form you're having
>> trouble with.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Feb 3, 9:52 am, Jonathan Lundell <[email protected]> wrote:
>>>> On Feb 3, 2012, at 7:46 AM, VP wrote:
>>
>>>>> Thanks. I just emailed you my routes.py.
>>
>>>>> But routes.py might not be the cause, because I have just removed it
>>>>> (without using routes.py), the problem still existed.
>>
>>>> Did you restart web2py? Until you do, it won't recognize the change.
>>
>>>> I added unit tests for the kind of thing you're seeing to both router
>>>> tests (pattern & parametric) and they seem to be working OK.
>>
>>>> There was a (possibly minor) problem with your routes.py. I suggest that
>>>> you fix it, using router.example.py as the basis, update the routes.py
>>>> doctest to work with your changes, and then add a doctest for the failing
>>>> conditions.
>>
>>>> (FWIW, I'm doing my testing in the trunk, but I don't think there's a
>>>> relevant change from 1.99.4.)
>>
>>>>> On Feb 3, 9:27 am, Jonathan Lundell <[email protected]> wrote:
>>>>>> On Feb 3, 2012, at 7:20 AM, VP wrote:
>>
>>>>>>>> Is it possible that you're invoking different routers on the two
>>>>>>>> systems? Or enabling routes on one and not the other?
>>
>>>>>>> Jonathan,
>>
>>>>>>> One configuration difference between the server and the personal
>>>>>>> computer is that on the server, I use routes.py, which
>>>>>>> routeswww.mysite.com
>>>>>>> and mysite.com to the appropriate app.
>>
>>>>>>> Could this be the problem? If so, how to fix it?
>>
>>>>>> Please post (or send me privately) your routes.py.