summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-12 13:38:18 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-04-13 22:08:22 +0000
commit7ab0829823024dd07d15ff6786e3648388d4f28d (patch)
treec9427e5d9dbfbb4f9492e549ad3b5063adf005a8 /src/corelib/io/qurl.cpp
parent5b37c9f7d3153a756af8fa89b2467c87a3021a8b (diff)
Fix parsing of empty port sections in URLs
The RFC does allow it. It even has examples showing them as valid. In section 6.2.3, it shows: http://example.com http://example.com/ http://example.com:/ http://example.com:80/ Change-Id: Id75834dab9ed466e94c7ffff1444b7195ad21cab Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r--src/corelib/io/qurl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index b51119c7ad..b27321b2a6 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -1046,7 +1046,7 @@ inline void QUrlPrivate::setAuthority(const QString &auth, int from, int end, QU
if (colonIndex == end - 1) {
// found a colon but no digits after it
- setError(PortEmptyError, auth, colonIndex + 1);
+ port = -1;
} else if (uint(colonIndex) < uint(end)) {
unsigned long x = 0;
for (int i = colonIndex + 1; i < end; ++i) {