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, eric.smith, martin.panter, orsenthil, serhiy.storchaka
Date 2016-12-01.02:33:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480559630.06.0.810319384059.issue28841@psf.upfronthosting.co.za>
In-reply-to
Content
Eric, Martin,

I'm sure this is an interpretation (and I'll be fair and give you both) that a URL of the form:

http://hostname.domain.tld:/path

should be held invalid. The rationale is per the section of the spec you quoted.

The other side of the argument is that the hostname and port are defined as:

hostname [ : port ] 

where port is defined as

*DIGIT

This implies that 0 digits is also valid.

I submit to you that the ambiguity would be removed if they:

- removed the paragraph telling people not to emit a : if there was no port, or
- changing the port definition to 1*DIGIT

Absent that, I believe that the paragraph implies that the intent was 1*DIGIT.

And therefore a : with no following number should generate an error.

I raise this because the behavior of urlparse() (the way it does things now) is being cited as the reason why other routines in OpenStack should handle this when the reason we were getting URL's with a : and no port was in fact an oversight.

So, in hearing the rationalization as being that "urlparse() does it, so ..." I figured I'd come to the source and see if we could make urlparse() do things unambiguously.

Now, if the reason it does this is because someone who came before me made the argument that a : with no port should be accepted, I guess I'm out of luck.
History
Date User Action Args
2016-12-01 02:33:50amrithsetrecipients: + amrith, orsenthil, eric.smith, martin.panter, serhiy.storchaka
2016-12-01 02:33:50amrithsetmessageid: <1480559630.06.0.810319384059.issue28841@psf.upfronthosting.co.za>
2016-12-01 02:33:50amrithlinkissue28841 messages
2016-12-01 02:33:49amrithcreate