Skip to content

Commit b53ba4e

Browse files
authored
Merge pull request #281 from alranel/issue280-http-metadata
Support dowloading SP metadata from non-HTTPS servers
2 parents 61aa66e + 6076e36 commit b53ba4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spid-validator/server/lib/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ class Utils {
6464
}
6565

6666
// check if URL exists
67-
https.get(src, (res) => {
67+
var q = url.parse(src, true);
68+
var protocol = (q.protocol == "http:") ? require('http') : require('https');
69+
protocol.get(src, (res) => {
6870
if(res.statusCode!='200') {
6971
return reject("Metadata non trovato alla URL indicata");
7072
}

0 commit comments

Comments
 (0)