From a0d62ab9bf0770649ac06ebfaee87e50d249e9af Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 13 Jun 2011 21:57:58 +0000 Subject: themes/base: use location.host, fallback to location.hostname in xhr.js, fixes AJAX with numeric IPv6 access --- themes/base/htdocs/luci-static/resources/xhr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/base') diff --git a/themes/base/htdocs/luci-static/resources/xhr.js b/themes/base/htdocs/luci-static/resources/xhr.js index a146fa8a1..096a04484 100644 --- a/themes/base/htdocs/luci-static/resources/xhr.js +++ b/themes/base/htdocs/luci-static/resources/xhr.js @@ -43,7 +43,7 @@ XHR = function() 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 ) -- cgit v1.2.3