WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
21015
KURL's getters are inconsitent about returning null or empty strings
https://bugs.webkit.org/show_bug.cgi?id=21015
Summary
KURL's getters are inconsitent about returning null or empty strings
Brett Wilson (Google)
Reported
2008-09-22 19:58:15 PDT
KURL's getters randomly return either isNull or empty strings. This is potentially dangerous if some code relies on this. Returns a null string on empty: pass() lastPathComponent() ref() Returns an empty string on empty (although at least some of these will return a null string if the URL is itself null): protocol() user() host() query() path() We can make them all return null strings, all return empty strings, or return null strings only when the URL is itself NULL, and empty the rest of the time (I think this is currently the dominant behavior).
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2008-09-23 00:05:04 PDT
With any changes, we'll need to check all callers - in many cases, the behavior is not exactly random, even if it is painfully inconsistent.
Anne van Kesteren
Comment 2
2023-05-22 03:40:50 PDT
We no longer use KURL.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug