forked from Mirrors/doipjs
Fix handling HKP URI
This commit is contained in:
parent
607f0434b9
commit
e599b32dba
1 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ const fetchURI = (uri) => {
|
||||||
reject('Invalid URI')
|
reject('Invalid URI')
|
||||||
}
|
}
|
||||||
|
|
||||||
const re = /([a-zA-Z0-9]*):([a-zA-Z0-9@._=+\-]*)(\:[a-zA-Z0-9@._=+\-]*)?/
|
const re = /([a-zA-Z0-9]*):([a-zA-Z0-9@._=+\-]*)(?:\:([a-zA-Z0-9@._=+\-]*))?/
|
||||||
const match = uri.match(re)
|
const match = uri.match(re)
|
||||||
|
|
||||||
if (!match[1]) {
|
if (!match[1]) {
|
||||||
|
@ -124,7 +124,7 @@ const fetchURI = (uri) => {
|
||||||
|
|
||||||
switch (match[1]) {
|
switch (match[1]) {
|
||||||
case 'hkp':
|
case 'hkp':
|
||||||
resolve(fetchHKP(match[2], match.length >= 4 ? match[3] : null))
|
resolve(fetchHKP(match[3] ? match[3] : match[2], match[3] ? match[2] : null))
|
||||||
break
|
break
|
||||||
case 'wkd':
|
case 'wkd':
|
||||||
resolve(fetchWKD(match[2]))
|
resolve(fetchWKD(match[2]))
|
||||||
|
|
Loading…
Reference in a new issue