From a0d62ab9bf0770649ac06ebfaee87e50d249e9af Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 13 Jun 2011 21:57:58 +0000 Subject: [PATCH] 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(-) 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 ) -- 2.11.0