themes/base: use location.host, fallback to location.hostname in xhr.js, fixes AJAX with numeric IPv6 access

This commit is contained in:
Jo-Philipp Wich 2011-06-13 21:57:58 +00:00
parent 5221623290
commit a0d62ab9bf

View file

@ -43,7 +43,7 @@ XHR = function()
var xhr = this._xmlHttp; var xhr = this._xmlHttp;
var code = this._encode( data ); var code = this._encode( data );
url = location.protocol + '//' + location.hostname + url = location.protocol + '//' + (location.host || location.hostname) +
( location.port ? ':' + location.port : '' ) + url; ( location.port ? ':' + location.port : '' ) + url;
if( code ) if( code )