<?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>20608</bug_id>
          
          <creation_ts>2008-09-02 14:34:28 -0700</creation_ts>
          <short_desc>host and hostname properties return incorrect (opposite) values</short_desc>
          <delta_ts>2009-09-04 12:41:47 -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>DOM</component>
          <version>525.x (Safari 3.1)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>28954</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladimir Olexa (vladinecko)">vladimir.olexa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89934</commentid>
    <comment_count>0</comment_count>
    <who name="Vladimir Olexa (vladinecko)">vladimir.olexa</who>
    <bug_when>2008-09-02 14:34:28 -0700</bug_when>
    <thetext>if you have a link like &lt;a href=&quot;http://www.apple.com:89234&quot;&gt;my link&lt;/a&gt; and then try to access its properties, link.host returns &quot;www.apple.com&quot; while hostname returns &quot;www.apple.com:89234&quot;

i believe those values should be swapped; host should return the full host name including port number and hostname should just return the host name. 

this is happening in shipping safari 3.1 as well as nightly build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89935</commentid>
    <comment_count>1</comment_count>
      <attachid>23126</attachid>
    <who name="Vladimir Olexa (vladinecko)">vladimir.olexa</who>
    <bug_when>2008-09-02 14:35:29 -0700</bug_when>
    <thetext>Created attachment 23126
Test case

simple test case to showcase the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89955</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2008-09-02 16:59:24 -0700</bug_when>
    <thetext>I believe we do it this way to match IE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90426</commentid>
    <comment_count>3</comment_count>
    <who name="Vladimir Olexa (vladinecko)">vladimir.olexa</who>
    <bug_when>2008-09-07 12:22:27 -0700</bug_when>
    <thetext>like many other things in IE, this is one of those that completely doesn&apos;t make sense and is counterintuitive. 

wouldn&apos;t we rather want to match firefox in behavior?  

(In reply to comment #2)
&gt; I believe we do it this way to match IE.
&gt; </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92925</commentid>
    <comment_count>4</comment_count>
    <who name="Przemyslaw Pawelczyk">przemoc</who>
    <bug_when>2008-09-26 07:23:48 -0700</bug_when>
    <thetext>Better test case: http://old.przemoc.net:81/host.html

Location is a kind of link, so if location&apos;s host and hostname properties works in every browser exactly the same, then it must be truth for ordinary links.

Results (Windows):
Gecko (Fx 3) - correct
IE 5/6/7 - correct
WebKit (Chrome, Opera 9.5, Safari 3.1) - incorrect</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92954</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-09-26 11:46:09 -0700</bug_when>
    <thetext>Thanks, confirmed as a difference with IE 7 and Firefox 3.

(In reply to comment #4)
&gt; WebKit (Chrome, Opera 9.5, Safari 3.1) - incorrect

Please note that Opera doesn&apos;t use WebKit. Maybe there is a reason behind this quirk if two engines have it  -but on the linked test case, it seems to be clear that we are in error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>144898</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-09-04 12:41:47 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 28954 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>23126</attachid>
            <date>2008-09-02 14:35:29 -0700</date>
            <delta_ts>2008-09-02 14:35:29 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>422</size>
            <attacher name="Vladimir Olexa (vladinecko)">vladimir.olexa</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c2NyaXB0PgphZGRFdmVudExpc3RlbmVyKCJjbGljayIsIG15RnVuY3Qs
IHRydWUpOwoKZnVuY3Rpb24gbXlGdW5jdChldmVudCkgewoJdmFyIGNvbnNvbGUgPSBkb2N1bWVu
dC5nZXRFbGVtZW50QnlJZCgiY29uc29sZSIpOwoJY29uc29sZS5pbm5lckhUTUwgKz0gImhvc3Q6
ICIgKyBldmVudC50YXJnZXQuaG9zdCArICI8YnIvPiI7Cgljb25zb2xlLmlubmVySFRNTCArPSAi
aG9zdG5hbWU6ICIgKyBldmVudC50YXJnZXQuaG9zdG5hbWU7CgkKCWV2ZW50LnByZXZlbnREZWZh
dWx0KCk7Cn0KPC9zY3JpcHQ+CjwvaGVhZD4KCjxib2R5Pgo8YSBpZD0ibXlMaW5rIiBocmVmPSJo
dHRwOi8vd3d3LmFwcGxlLmNvbTo3Mzg0Ij5Tb21lIGxpbms8L2E+CjxkaXYgaWQ9ImNvbnNvbGUi
PjwvZGl2Pgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>