Re: [Web-SIG] [proposal] wsgiref.util.abs_url

2008-05-06 Thread Manlio Perillo
Phillip J. Eby ha scritto: At 06:27 PM 5/5/2008 +0200, Manlio Perillo wrote: Phillip J. Eby ha scritto: I think that it doesn't accept a relative URL, it accepts an absolute path. What do you mean? environ = {} setup_testing_defaults(environ) url = '/a/b/' That's a relative URL that's

Re: [Web-SIG] [proposal] wsgiref.util.abs_url

2008-05-05 Thread Phillip J. Eby
At 06:27 PM 5/5/2008 +0200, Manlio Perillo wrote: Phillip J. Eby ha scritto: I think that it doesn't accept a relative URL, it accepts an absolute path. What do you mean? environ = {} setup_testing_defaults(environ) url = '/a/b/' That's a relative URL that's also an absolute path. Try

Re: [Web-SIG] [proposal] wsgiref.util.abs_url

2008-05-05 Thread Manlio Perillo
Phillip J. Eby ha scritto: At 11:03 PM 5/2/2008 +0200, Manlio Perillo wrote: Hi. I think that a function like (not tested): def abs_url(environ, relative_url): """Return the absolute url""" [...] url += quote(relative_url) return url would be an useful addition to the wsgiref.ut

Re: [Web-SIG] [proposal] wsgiref.util.abs_url

2008-05-04 Thread Phillip J. Eby
At 11:03 PM 5/2/2008 +0200, Manlio Perillo wrote: Hi. I think that a function like (not tested): def abs_url(environ, relative_url): """Return the absolute url""" [...] url += quote(relative_url) return url would be an useful addition to the wsgiref.util module. What do you thi