summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
authorChristian Schneider2014-10-10 15:50:16 +0200
committerChristian Schneider2014-10-10 15:50:16 +0200
commitaf2558ed5d1486668174e608a2889d099cc70edc (patch)
tree1f7ebba953e13fc9b2ec0640bbfaf566dea604f2 /itjs
parent603e6eadeedbd4717056965a18a8416c8d3c5885 (diff)
downloaditools-af2558ed5d1486668174e608a2889d099cc70edc.tar.gz
itools-af2558ed5d1486668174e608a2889d099cc70edc.tar.bz2
itools-af2558ed5d1486668174e608a2889d099cc70edc.zip
Allow omission of url scheme and accept https as well
Diffstat (limited to 'itjs')
-rwxr-xr-xitjs/http.js2
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
{