summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/KURL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/KURL.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/KURL.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/KURL.cpp b/src/3rdparty/webkit/WebCore/platform/KURL.cpp
index ffacc19..c5829d2 100644
--- a/src/3rdparty/webkit/WebCore/platform/KURL.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/KURL.cpp
@@ -1269,8 +1269,8 @@ void KURL::parse(const char* url, const String* originalString)
m_userStart = m_userEnd = m_passwordEnd = m_hostEnd = m_portEnd = p - buffer.data();
// For canonicalization, ensure we have a '/' for no path.
- // Only do this for http and https.
- if (m_protocolInHTTPFamily && pathEnd - pathStart == 0)
+ // Do this only for hierarchical URL with protocol http or https.
+ if (m_protocolInHTTPFamily && hierarchical && pathEnd == pathStart)
*p++ = '/';
// add path, escaping bad characters