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 think?

I think that it doesn't accept a relative URL, it accepts an absolute path.

I also think that using urlparse.urljoin() with either request_uri() or application_uri() would be a clearer (and tested) way to obtain an absolute URL, and more generally useful.

_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to