[issue10860] Handle empty port after port delimiter in httplib
Éric Araujo
report at bugs.python.org
Fri Feb 4 05:16:44 CET 2011
Éric Araujo <merwok at netwok.org> added the comment:
>From RFC 3986, section 6.2.3 “Scheme-Based Normalization”:
The syntax and semantics of URIs vary from scheme to scheme, as
described by the defining specification for each scheme.
Implementations may use scheme-specific rules, at further processing
cost, to reduce the probability of false negatives. For example,
because the "http" scheme makes use of an authority component, has a
default port of "80", and defines an empty path to be equivalent to
"/", the following four URIs are equivalent:
http://example.com
http://example.com/
http://example.com:/
http://example.com:80/
IOW, the empty string is not an invalid port. The patch fixes that. It includes tests but lacks a doc update. I think it works for https URIs too, but I’d like a test to make sure.
----------
resolution: invalid ->
stage: needs patch -> patch review
status: pending -> open
versions: +Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10860>
_______________________________________
More information about the Python-bugs-list
mailing list