repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
0c61b59
parent
a0926f1
author
Eric Bower
date
2024-01-03 02:57:44 +0000 UTC
fix(prose): support trailing "/" in url

Closes: https://github.com/picosh/pico/issues/64
1 files changed,  +3, -0
M prose/api.go
+3, -0
 1@@ -8,6 +8,7 @@ import (
 2 	"net/url"
 3 	"os"
 4 	"strconv"
 5+	"strings"
 6 	"time"
 7 
 8 	"slices"
 9@@ -332,6 +333,8 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
10 		slug, _ = url.PathUnescape(shared.GetField(r, 0))
11 	}
12 
13+	slug = strings.TrimSuffix(slug, "/")
14+
15 	dbpool := shared.GetDB(r)
16 	logger := shared.GetLogger(r)
17