themes/base: use location.host, fallback to location.hostname in xhr.js, fixes AJAX...
[project/luci.git] / themes / base / htdocs / luci-static / resources / xhr.js
index a146fa8..096a044 100644 (file)
@@ -43,7 +43,7 @@ XHR = function()
                var xhr  = this._xmlHttp;
                var code = this._encode( data );
 
                var xhr  = this._xmlHttp;
                var code = this._encode( data );
 
-               url = location.protocol + '//' + location.hostname +
+               url = location.protocol + '//' + (location.host || location.hostname) +
                        ( location.port ? ':' + location.port : '' ) + url;
 
                if( code )
                        ( location.port ? ':' + location.port : '' ) + url;
 
                if( code )