1
0

Status 204 prevents a Deleted page rendering.

This commit is contained in:
Alexander Andreev 2023-05-27 19:31:11 +04:00
parent e695becbcd
commit 31f84721ad
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -211,7 +211,6 @@ func (h *UploadHandlers) Delete(w http.ResponseWriter, r *http.Request) {
h.logFile.Printf("| dt | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, saltedHash, r.UserAgent()) h.logFile.Printf("| dt | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, saltedHash, r.UserAgent())
w.WriteHeader(http.StatusNoContent)
if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") { if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") {
fmt.Fprintln(w, "File was successfully deleted.") fmt.Fprintln(w, "File was successfully deleted.")
} else { } else {