Check http status when uploading key
This commit is contained in:
parent
2fe10749a1
commit
85efb463cf
|
@ -61,7 +61,10 @@ HKP.prototype.lookup = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return fetch(uri).then(function(response) {
|
return fetch(uri).then(function(response) {
|
||||||
return response.text();
|
if (response.status === 200) {
|
||||||
|
return response.text();
|
||||||
|
}
|
||||||
|
|
||||||
}).then(function(publicKeyArmored) {
|
}).then(function(publicKeyArmored) {
|
||||||
if (!publicKeyArmored || publicKeyArmored.indexOf('-----END PGP PUBLIC KEY BLOCK-----') < 0) {
|
if (!publicKeyArmored || publicKeyArmored.indexOf('-----END PGP PUBLIC KEY BLOCK-----') < 0) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user