RESOLVED INVALID97444
ASSERT in KURL::KURL() when url did not inlude path.
https://bugs.webkit.org/show_bug.cgi?id=97444
Summary ASSERT in KURL::KURL() when url did not inlude path.
yannick.poirier
Reported 2012-09-24 03:27:34 PDT
Construct a url : KURL(ParsedURLString, "http://www.example.com" ); KURL hits ASSERT(url == m_string) because KURL appends a slash at the end of m_string It's reproducible with CURL ResourceHandleManager.cpp: headerCallback(char* ptr, size_t size, size_t nmemb, void* data){ ... curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr); /* hdr might not contain a path */ d->m_response.setURL(KURL(ParsedURLString, hdr)); }
Attachments
Alexey Proskuryakov
Comment 1 2012-09-24 09:25:48 PDT
The ParsedURLString constructor can only be used with strings returned by KURL::string() (and then only if the URL was valid). It's a performance optimization applicable when we know that the string is normalized the way KURL likes it. For arbitrary URL strings, use a proper constructor with a correct base URL.
Note You need to log in before you can comment on or make changes to this bug.