- change required to make previous checkin work with English language RSS pages
* kwq/KWQKURL.h:
new private method isHierarchical
* kwq/KWQKURL.mm:
(KURL::KURL):
add hierarchical base URL check when determining whether the URL is absolute
(KURL::isHierarchical):
new method, returns true if this is a valid URL with a slash just past the scheme's trailing colon
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8604
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-02-16 John Sullivan <sullivan@apple.com>
+
+ Written by Darin, reviewed by Maciej and me
+
+ - change required to make previous checkin work with English language RSS pages
+
+ * kwq/KWQKURL.h:
+ new private method isHierarchical
+ * kwq/KWQKURL.mm:
+ (KURL::KURL):
+ add hierarchical base URL check when determining whether the URL is absolute
+ (KURL::isHierarchical):
+ new method, returns true if this is a valid URL with a slash just past the scheme's trailing colon
+
2005-02-16 John Sullivan <sullivan@apple.com>
Written by Darin, reviewed by me.
friend bool operator==(const KURL &, const KURL &);
private:
+ bool isHierarchical() const;
void parse(const char *url, const QString *originalString);
#ifdef CONSTRUCT_CANONICAL_STRING
++p;
}
if (*p == ':') {
- if (p[1] != '/' && base.protocol().lower() == QString(str, p - str).lower())
+ if (p[1] != '/' && base.protocol().lower() == QString(str, p - str).lower() && base.isHierarchical())
str = p + 1;
else
absolute = true;
return string.left(pathEnd).replace('\\','/') + string.mid(pathEnd);
}
+
+bool KURL::isHierarchical() const
+{
+ if (!m_isValid)
+ return false;
+ assert(urlString[schemeEndPos] == ':');
+ return urlString[schemeEndPos + 1] == '/';
+}