From 1888943c57265ea4d9a8e9f56ff4b5a73e17d31f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 19 Feb 2021 16:29:58 +0100 Subject: [PATCH] fix Etag format (fixes #82) --- cmd/octorpki/octorpki.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/octorpki/octorpki.go b/cmd/octorpki/octorpki.go index 3029cd6..9dee42e 100644 --- a/cmd/octorpki/octorpki.go +++ b/cmd/octorpki/octorpki.go @@ -1002,7 +1002,7 @@ func (s *state) ServeROAs(w http.ResponseWriter, r *http.Request) { etag := sha256.New() etag.Write([]byte(fmt.Sprintf("%v/%v", tmp.Metadata.Generated, tmp.Metadata.Counts))) etagSum := etag.Sum(nil) - etagSumHex := hex.EncodeToString(etagSum) + etagSumHex := "\"" + hex.EncodeToString(etagSum) + "\"" if match := r.Header.Get("If-None-Match"); match != "" { if match == etagSumHex {