themes/base: fix xhr.js for https:// access
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 10:23:23 +0000 (10:23 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 10:23:23 +0000 (10:23 +0000)
themes/base/htdocs/luci-static/resources/xhr.js

index 3a30e04..a146fa8 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 = 'http://' + location.hostname +
+               url = location.protocol + '//' + location.hostname +
                        ( location.port ? ':' + location.port : '' ) + url;
 
                if( code )
                        ( location.port ? ':' + location.port : '' ) + url;
 
                if( code )