Update armor.js
Small tweak
This commit is contained in:
parent
93d823abb4
commit
1e8bd4315b
|
@ -224,9 +224,12 @@ function splitHeaders(text) {
|
||||||
*/
|
*/
|
||||||
function verifyHeaders(headers) {
|
function verifyHeaders(headers) {
|
||||||
for (var i = 0; i < headers.length; i++) {
|
for (var i = 0; i < headers.length; i++) {
|
||||||
if (!/^[^: ]+: .+$/.test(headers[i])) {
|
if (!/^[^:\s]+: .+$/.test(headers[i])) {
|
||||||
throw new Error('Improperly formatted armor header: ' + headers[i]);
|
throw new Error('Improperly formatted armor header: ' + headers[i]);
|
||||||
}
|
}
|
||||||
|
if (!/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(headers[i])) {
|
||||||
|
console.log('Unknown header: ' + headers[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user