1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Warn in checker and downloader if advisories are delivered as none 'application/json'

This commit is contained in:
Sascha L. Teichmann 2023-02-01 01:36:54 +01:00
parent 052dbbe1d0
commit 6430712dad
2 changed files with 14 additions and 0 deletions

View file

@ -467,6 +467,13 @@ func (p *processor) integrity(
continue
}
// Warn if we do not get JSON.
if ct := res.Header.Get("Content-Type"); ct != "application/json" {
lg(WarnType,
"The content type of %s should be 'application/json but is '%s'",
u, ct)
}
s256 := sha256.New()
s512 := sha512.New()
data.Reset()