A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042604.html below:

URL splitter that returns host, port, request URL

[Python-Dev] Suggestion: URL splitter that returns host, port, request URLAahz aahz at pythoncraft.com
Wed Feb 18 21:11:33 EST 2004
On Wed, Feb 18, 2004, Hamish Lawson wrote:
>
> The HTTP clients provided by many libraries (httplib in the Standard 
> Library, asynchttp, Twisted) do not deal with absolute URLs but instead 
> with the three component parts of host, port, and request URL. However 
> these are not the parts returned by either urlparse.urlsplit or 
> urlparse.urlparse. I therefore suggest it might be useful to have in the 
> Standard Library a function that splits an absolute URL into host, port, 
> and request URL. So for the following URL:
> 
>     "http://www.python.org/cgi-bin/moinmoin/FrontPage?action=edit"
> 
> the function would return
> 
>     ("www.python.org", 80, "/cgi-bin/moinmoin/FrontPage?action=edit")
> 
> An optional parameter could specify which port to use as default.

Sounds good; you'll need to post a patch on SF to make progress.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4