python / cpython

The Python programming language
https://www.python.org
Other
62.42k stars 29.97k forks source link

urlparse return exchanged values #43916

Closed 2c6796f6-b42e-4b11-964a-a83fae17c83f closed 18 years ago

2c6796f6-b42e-4b11-964a-a83fae17c83f commented 18 years ago
BPO 1549589
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['library'] title = 'urlparse return exchanged values' updated_at = user = 'https://bugs.python.org/oscarah' ``` bugs.python.org fields: ```python activity = actor = 'oscarah' assignee = 'none' closed = True closed_date = None closer = None components = ['Library (Lib)'] creation = creator = 'oscarah' dependencies = [] files = [] hgrepos = [] issue_num = 1549589 keywords = [] message_count = 3.0 messages = ['29716', '29717', '29718'] nosy_count = 2.0 nosy_names = ['georg.brandl', 'oscarah'] pr_nums = [] priority = 'normal' resolution = 'duplicate' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue1549589' versions = ['Python 2.4'] ```

2c6796f6-b42e-4b11-964a-a83fae17c83f commented 18 years ago

The urlparser module is used to split an url into 6 fields, acording to the pertinent spec.

The fields are:

The netloc of http://www.google.es/index.html is: "www.google.es" and the path is "/index.html", ok?

But if you try this:
  >>> urlparse("www.google.es") 
the answer is:
('', '', 'www.google.es', '', '', '')
instead of 
('', 'www.google.es', '', '', '', '')

On the other hand, if you try this:
 >>> urlparse("http://www.google.es")
the answer is:
('http', 'www.google.es', '', '', '', '')
 which is correct.

The pytho header is: Python 2.4.4c0 (#2, Jul 30 2006, 15:43:58) [GCC 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)] on linux2

and I downloaded the latest version of that lib (urlparse.py, at 2006 08 30)

Thats all. Thanks.

birkenfeld commented 18 years ago

Logged In: YES user_id=849994

Duplicate of bpo-754016.

2c6796f6-b42e-4b11-964a-a83fae17c83f commented 18 years ago

Logged In: YES user_id=1587388

Sorry then! I look for it but i haven't found anything. Thanks for your time.