Skip to content

Commit 19b0603

Browse files
author
yanghengfei
committed
fix url path with two slash
1 parent 4969aec commit 19b0603

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

baa.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ func (b *Baa) ServeHTTP(w http.ResponseWriter, r *http.Request) {
132132
c.Reset(w, r)
133133

134134
// build handler chain
135-
h, name := b.Router().Match(r.Method, r.URL.Path, c)
135+
path := strings.Replace(r.URL.Path, "//", "/", -1)
136+
h, name := b.Router().Match(r.Method, path, c)
136137
c.routeName = name
137138

138139
// notFound

0 commit comments

Comments
 (0)