mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
23164ac7f2
- Pin gofakes3 with conditional PUT, multipart completion, and copy support - Derive object ETags from content and preserve matching multipart validators - Keep conditional requests in the S3 handler instead of redirecting them - Format modification times in UTC and propagate storage errors - Close content readers and discard metadata after successful deletion - Add regression tests for object hashes, metadata, and conditional redirects Co-authored-by: Codex <267193182+codex@users.noreply.github.com> Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>
13 lines
268 B
Go
13 lines
268 B
Go
package s3
|
|
|
|
import "net/http"
|
|
|
|
func hasPreconditions(r *http.Request) bool {
|
|
for _, name := range []string{"If-Match", "If-None-Match", "If-Modified-Since", "If-Unmodified-Since", "If-Range"} {
|
|
if _, ok := r.Header[name]; ok {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|