<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>21015</bug_id>
          
          <creation_ts>2008-09-22 19:58:15 -0700</creation_ts>
          <short_desc>KURL&apos;s getters are inconsitent about returning null or empty strings</short_desc>
          <delta_ts>2023-05-22 03:40:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>37641</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Brett Wilson (Google)">brettw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92267</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2008-09-22 19:58:15 -0700</bug_when>
    <thetext>KURL&apos;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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92292</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-09-23 00:05:04 -0700</bug_when>
    <thetext>With any changes, we&apos;ll need to check all callers - in many cases, the behavior is not exactly random, even if it is painfully inconsistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956891</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-22 03:40:50 -0700</bug_when>
    <thetext>We no longer use KURL.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>