mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Try to minimize redundant downloads.
This commit is contained in:
parent
9967bfffe6
commit
594e6b4b0d
3 changed files with 80 additions and 39 deletions
|
|
@ -74,6 +74,14 @@ func (o *options) prepare() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// protectedAccess returns true if we have client certificates or
|
||||
// extra http headers configured.
|
||||
// This may be a wrong assumption, because the certs are not checked
|
||||
// for their domain and custom headers may have other purposes.
|
||||
func (o *options) protectedAccess() bool {
|
||||
return len(o.clientCerts) > 0 || len(o.ExtraHeader) > 0
|
||||
}
|
||||
|
||||
// writeJSON writes the JSON encoding of the given report to the given stream.
|
||||
// It returns nil, otherwise an error.
|
||||
func writeJSON(report *Report, w io.WriteCloser) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue