mirror of
https://github.com/aljazceru/khatru.git
synced 2025-12-17 05:24:22 +01:00
fix(blossom): remove extra . when serving files without extension
Ensure the correct filename is constructed when serving content without an extension
This commit is contained in:
committed by
fiatjaf_
parent
b2607e787f
commit
5705647c6b
@@ -220,7 +220,11 @@ func (bs BlossomServer) handleGetBlob(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
w.Header().Set("ETag", hhash)
|
||||
w.Header().Set("Cache-Control", "public, max-age=604800, immutable")
|
||||
http.ServeContent(w, r, hhash+"."+ext, t, reader)
|
||||
name := hhash
|
||||
if ext != "" {
|
||||
name += "." + ext
|
||||
}
|
||||
http.ServeContent(w, r, name, t, reader)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user