Skip to content

Commit dafa47c

Browse files
author
Sergio Andres Virviescas Santana
committed
Revert OriginalPath to Path
1 parent 2ca5a6a commit dafa47c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func (r *Router) Handler(ctx *fasthttp.RequestCtx) {
295295
defer r.recv(ctx)
296296
}
297297

298-
path := gotils.B2S(ctx.URI().PathOriginal())
298+
path := gotils.B2S(ctx.Path())
299299
method := gotils.B2S(ctx.Method())
300300

301301
if root := r.trees[method]; root != nil {

router_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ func TestRouterNotFound(t *testing.T) {
616616
{"/DIR/", 301}, // Fixed Case +/
617617
{"/paTh/?name=foo", 301}, // Fixed Case With Params +/
618618
{"/paTh?name=foo", 301}, // Fixed Case With Params +/
619-
{"/../path", 301}, // CleanPath
619+
{"/../path", 200}, // CleanPath (Not clean by router, this path is cleaned by fasthttp `ctx.Path()`)
620620
{"/nope", 404}, // NotFound
621621
}
622622

0 commit comments

Comments
 (0)