<?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>21979</bug_id>
          
          <creation_ts>2008-10-30 11:48:11 -0700</creation_ts>
          <short_desc>KURL doesn&apos;t canonicalize redundant port numbers</short_desc>
          <delta_ts>2012-05-18 11:23:02 -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>DUPLICATE</resolution>
          <dup_id>54090</dup_id>
          
          <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>ap</cc>
    
    <cc>tmpsantos</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97144</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2008-10-30 11:48:11 -0700</bug_when>
    <thetext>KURL doesn&apos;t strip port numbers that are redundant according to the current scheme. For example, &quot;http://apple.com:80/foo&quot; will keep the &quot;:80&quot;. This is not a canonical form. This will cause problems with link coloring, and perhaps in other parts of the system.

NSURL seems to do this properly, and it gets stripped at a later point in the loading process. But it seems that everybody should agree about what this URL is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627466</commentid>
    <comment_count>1</comment_count>
    <who name="Thiago Marcos P. Santos">tmpsantos</who>
    <bug_when>2012-05-18 01:38:43 -0700</bug_when>
    <thetext>I have a similar problem here that might be related to this.

I get 0 as port number when calling SecurityOrigin::port() if the port is the default port number for the protocol (i.e http://foobar/ or http://foobar:80/). IMO it should return 80.

If I have, let&apos;s say, http://foobar:123/, it returns 123 as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627516</commentid>
    <comment_count>2</comment_count>
    <who name="Thiago Marcos P. Santos">tmpsantos</who>
    <bug_when>2012-05-18 02:42:29 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I have a similar problem here that might be related to this.
&gt; 
&gt; I get 0 as port number when calling SecurityOrigin::port() if the port is the default port number for the protocol (i.e http://foobar/ or http://foobar:80/). IMO it should return 80.
&gt; 
&gt; If I have, let&apos;s say, http://foobar:123/, it returns 123 as expected.

Looks like that both KURL and SecurityOrigin clears the port when it is the default port. Does anyone knows why?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627569</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-18 04:51:25 -0700</bug_when>
    <thetext>It&apos;s important for compatibility that SecurityOrigin canonicalize the port.  I don&apos;t think it matters if it canonicalizes to 0 or to the default port number, although it might impact the identifiers for persistent storage, so we&apos;ll need to be careful if we change it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627844</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-05-18 11:23:02 -0700</bug_when>
    <thetext>The original issue reported here has been fixed in bug 54090. It&apos;s best to file separate bugs for related issues, or to discuss them on our mailing lists.

&gt; This will cause problems with link coloring

In fact, link coloring used to work, and got broken by this change, which is tracked as bug 78358.

*** This bug has been marked as a duplicate of bug 54090 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>