document.location.host value always ':'
Reported by Liam Clancy (metafeather) | November 24th, 2009 @ 07:23 AM | in 1.2.x
The logic for determining the
document.location.host
has a misplaced )
which results in the value returned always being :
For example if the URL is
http://some.domain.name:8080/my/file.html
the values
below should be:
document.location.hostname -> some.domain.name
document.location.port -> 8080
document.location.host -> some.domain.name:8080
the common exception in browsers is that ports 80 and 443 are always hidden if the protocols are http and https respectively, even if manual entered into the URL.
The correct logic is used for set hostname()
and
can be used for get host()
in:
src/html/anchor.js
src/window/location.js
Comments and changes to this ticket
-
Liam Clancy (metafeather) November 24th, 2009 @ 07:29 AM
I've pushed a fix for the
:
issue here: http://github.com/metafeather/env-js/commit/881593e8c4ab063080b26de... -
Thatcher November 24th, 2009 @ 04:06 PM
- Assigned user set to Thatcher
thanks liam, I will get this pulled in tonight!
-
Thatcher February 3rd, 2010 @ 04:45 PM
- Milestone set to 1.2.x
- State changed from new to open
This is one of those embarrassing tickets because I said it was already going to have been fixed. Hopefully it is now but I will verify before I close the ticket. Sorry! But thanks for the ticket because it doe mean if I forget I can't forget forever
-
Thatcher February 5th, 2010 @ 05:10 PM
- State changed from open to resolved
- Tag set to location xhr port host hostname
I believe this is fixed in trunk. Check out the test/specs/xhr/spec.js which can be run in both envjs via
ant xhr-spec
or loaded as html in ff to verify.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
a javascript browser environment