Mark Ramm schrieb:
>> Regarding 1.0.6 I'd like to perform a release tonight since we have
>> some fixes that yearn to be released in the wild.
> 
> Also +1

I'm also for releasing it asap, but I'd like to fix one problem first.

The problem is that TG 1.0 and 1.1 had used request.path in many places,
which lead to problems when a server.webpath is set, since the
request.path usually includes the webpath (except when you proxy it
without the webpath). If you then do a tg.url(request.path), the webpath
gets doubled.

So instead of request.path, we actually need the path with the webpath
stripped off. Since this is not available in CP 2, I replaced
request.path with request.object_path as a workaround in TG 1.0 and 1.1.

This worked relatively well, but I just noticed that this breaks when
you have a url like "/trac/ticket/23", where 23 is mapped as an
argument. Then the object_path will only be "/trac/ticket".

My idea is now to modify the startup.VirtualPathFilter so that it
creates an additional attribute request.path_info (that CP 2 does not
provide), and that will be simply request.path with both SCRIPT_NAME and
server.webpath stripped off.

Just tested this with a TG 1.0 application, works like a charm, and
feels much cleaner than the request.object_path hack. Also, CP 3 comes
with request.path_info, and we would be more compatible with TG 1.5.

If nobody is against, I would like to commit these changes tonight.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to