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)); }
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.