mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 07:41:23 +00:00
Merge remote-tracking branch 'origin/feat/client-events' into feat/hardening
This commit is contained in:
commit
8ff8a5fb26
1 file changed
+2
-2
@@ -57,14 +57,14 @@ func (f *fakeS3) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
out.WriteString(`</ListBucketResult>`)
|
||||
w.Header().Set("Content-Type", "application/xml")
|
||||
w.Write([]byte(out.String()))
|
||||
_, _ = w.Write([]byte(out.String()))
|
||||
case r.Method == http.MethodGet:
|
||||
body, ok := f.objects[key]
|
||||
if !ok {
|
||||
http.Error(w, "no such key", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
w.Write(body)
|
||||
_, _ = w.Write(body)
|
||||
case r.Method == http.MethodDelete:
|
||||
delete(f.objects, key)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
||||
Reference in new issue
Block a user