mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-29 07:03:48 +03:00
fix rebase
This commit is contained in:
parent
b732a7999a
commit
38fba5916c
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
package fileserver
|
package fileserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
@ -690,6 +691,9 @@ func (fsrv *FileServer) getEtagFromFile(fileSystem fs.FS, filename string) (stri
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("cannot read etag from file %s: %v", etagFilename, err)
|
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 string(etag), nil
|
||||||
}
|
}
|
||||||
return "", nil
|
return "", nil
|
||||||
|
|
Loading…
Reference in a new issue