diff options
author | Christian Schneider | 2014-10-10 15:50:16 +0200 |
---|---|---|
committer | Christian Schneider | 2014-10-10 15:50:16 +0200 |
commit | af2558ed5d1486668174e608a2889d099cc70edc (patch) | |
tree | 1f7ebba953e13fc9b2ec0640bbfaf566dea604f2 /itjs/http.js | |
parent | 603e6eadeedbd4717056965a18a8416c8d3c5885 (diff) | |
download | itools-af2558ed5d1486668174e608a2889d099cc70edc.tar.gz itools-af2558ed5d1486668174e608a2889d099cc70edc.tar.bz2 itools-af2558ed5d1486668174e608a2889d099cc70edc.zip |
Allow omission of url scheme and accept https as well
Diffstat (limited to 'itjs/http.js')
-rwxr-xr-x | itjs/http.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs/http.js b/itjs/http.js index 5773cda..9f1bd4b 100755 --- a/itjs/http.js +++ b/itjs/http.js @@ -52,7 +52,7 @@ send: function(url, method, postdata) this.busy = true; this.req = null; - var samehost = (url.indexOf('http://') < 0 || url.indexOf(window.location.hostname) > 0); + var samehost = (!url.match(/^(\w+:)?\/\//) || url.indexOf(window.location.hostname) > 0); if (samehost) // use XMLHTTP request only if on same host { |