This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amrith
Recipients amrith
Date 2016-11-30.15:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480521425.85.0.782501279738.issue28841@psf.upfronthosting.co.za>
In-reply-to
Content
The urlparse library incorrectly accepts a URI which specifies an invalid host identifier.

Example:

http://www.example.com:/abc

Looking at the URI specifications, this is an invalid URI.

By definition, you are supposed to specify a "hostport" and a hostport is defined as:

https://www.w3.org/Addressing/URL/uri-spec.html

hostport
    host [ : port ]

The BNF indicates that : is only valid if a port is also specified.

See current behavior; I submit to you that this should generate an exception.

https://gist.github.com/anonymous/8504f160ff90649890b5a2a82f8028b0
History
Date User Action Args
2016-11-30 15:57:05amrithsetrecipients: + amrith
2016-11-30 15:57:05amrithsetmessageid: <1480521425.85.0.782501279738.issue28841@psf.upfronthosting.co.za>
2016-11-30 15:57:05amrithlinkissue28841 messages
2016-11-30 15:57:05amrithcreate