Skip to content

URLs without a period stopped working as of 1.1.1 #22

@jogo

Description

@jogo

Pre 87792fe

>>> import urlnorm; urlnorm.norm('http://example')
u'http://example/'

on 1.1.4

>>> import urlnorm; urlnorm.norm('http://example')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    import urlnorm; urlnorm.norm('http://newcanonical')
  File "/usr/local/lib/python2.7/dist-packages/urlnorm.py", line 158, in norm
    normalized_tuple = norm_tuple(*url_tuple)
  File "/usr/local/lib/python2.7/dist-packages/urlnorm.py", line 166, in norm_tuple
    authority = norm_netloc(scheme, authority)
  File "/usr/local/lib/python2.7/dist-packages/urlnorm.py", line 239, in norm_netloc
    raise InvalidUrl('host %r is not valid' % host)
InvalidUrl: host u'example' is not valid

Inside of an intranet, these can be valid addresses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions