mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 03:31:02 -06:00
Redirect to collection url if improperly formatted
This commit is contained in:
@@ -24,6 +24,10 @@ var htmlReplacer = strings.NewReplacer(
|
||||
)
|
||||
|
||||
func serveCollection(w http.ResponseWriter, r *http.Request, ri ResourceInfo) {
|
||||
if !strings.HasSuffix(r.URL.Path, "/") {
|
||||
http.Redirect(w, r, r.URL.String()+"/", http.StatusMovedPermanently)
|
||||
return
|
||||
}
|
||||
if checkIfModifiedSince(r, ri) == condFalse {
|
||||
writeNotModified(w)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user