fix rebase

This commit is contained in:
a 2024-06-24 11:49:49 -05:00
parent b732a7999a
commit 38fba5916c
No known key found for this signature in database
GPG key ID: 374BC539FE795AF0

View file

@ -15,6 +15,7 @@
package fileserver
import (
"bytes"
"errors"
"fmt"
"io"
@ -690,6 +691,9 @@ func (fsrv *FileServer) getEtagFromFile(fileSystem fs.FS, filename string) (stri
if err != nil {
return "", fmt.Errorf("cannot read etag from file %s: %v", etagFilename, err)
}
// Etags should not contain newline characters
etag = bytes.ReplaceAll(etag, []byte("\n"), []byte{})
return string(etag), nil
}
return "", nil