durusmail: quixote-users: [PATCH] request.get_path works with negative arg
[PATCH] request.get_path works with negative arg
[PATCH] request.get_path works with negative arg
[PATCH] request.get_path works with negative arg
Mark Bucciarelli
2003-11-10
On Sunday 09 November 2003 10:02 pm, Larry Tjoelker wrote:
> Mark Bucciarelli  writes:
> > I wanted to be able to get the path component by counting out from the
> > server. The enclosed patch makes request.get_path() work with negative
> > args.
> >
> > For example, if the path = '/bar/baz/', then request.get_path(-1) returns
> > '/bar'.
>
> Would you ever want to access the server root, '/', by this syntax?

I'd use the existing get_server() method for this.

Regards,

--
Mark Bucciarelli, www.hubcapconsulting.com
  As we enjoy great advantages from inventions of others, we should
be glad of an opportunity to serve others by any invention of ours;
and this we should do freely and generously.  -- Benjamin Franklin

reply