Skip to content

Commit

Permalink
fix Etag format (fixes cloudflare#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
reschke authored Feb 19, 2021
1 parent 9abe2d3 commit 1888943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/octorpki/octorpki.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1888943

Please sign in to comment.