Bug 97444
| Summary: | ASSERT in KURL::KURL() when url did not inlude path. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | yannick.poirier |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | Unspecified | ||
yannick.poirier
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
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.