WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 28954
20608
host and hostname properties return incorrect (opposite) values
https://bugs.webkit.org/show_bug.cgi?id=20608
Summary
host and hostname properties return incorrect (opposite) values
Vladimir Olexa (vladinecko)
Reported
2008-09-02 14:34:28 PDT
if you have a link like <a href="
http://www.apple.com:89234
">my link</a> and then try to access its properties, link.host returns "www.apple.com" while hostname returns "www.apple.com:89234" 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.
Attachments
Test case
(422 bytes, text/html)
2008-09-02 14:35 PDT
,
Vladimir Olexa (vladinecko)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Vladimir Olexa (vladinecko)
Comment 1
2008-09-02 14:35:29 PDT
Created
attachment 23126
[details]
Test case simple test case to showcase the bug
Sam Weinig
Comment 2
2008-09-02 16:59:24 PDT
I believe we do it this way to match IE.
Vladimir Olexa (vladinecko)
Comment 3
2008-09-07 12:22:27 PDT
like many other things in IE, this is one of those that completely doesn't make sense and is counterintuitive. wouldn't we rather want to match firefox in behavior? (In reply to
comment #2
)
> I believe we do it this way to match IE. >
Przemyslaw Pawelczyk
Comment 4
2008-09-26 07:23:48 PDT
Better test case:
http://old.przemoc.net:81/host.html
Location is a kind of link, so if location'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
Alexey Proskuryakov
Comment 5
2008-09-26 11:46:09 PDT
Thanks, confirmed as a difference with IE 7 and Firefox 3. (In reply to
comment #4
)
> WebKit (Chrome, Opera 9.5, Safari 3.1) - incorrect
Please note that Opera doesn'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.
Alexey Proskuryakov
Comment 6
2009-09-04 12:41:47 PDT
*** This bug has been marked as a duplicate of
bug 28954
***
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