File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,6 @@ func optionsMethodHandler(allowMethods string) func(c Context) error {
524
524
// - Return it `Echo#ReleaseContext()`.
525
525
func (r * Router ) Find (method , path string , c Context ) {
526
526
ctx := c .(* context )
527
- ctx .path = path
528
527
currentNode := r .tree // Current node as root
529
528
530
529
var (
Original file line number Diff line number Diff line change @@ -674,6 +674,18 @@ func TestRouterStatic(t *testing.T) {
674
674
assert .Equal (t , path , c .Get ("path" ))
675
675
}
676
676
677
+ func TestRouterNoRoutablePath (t * testing.T ) {
678
+ e := New ()
679
+ r := e .router
680
+ c := e .NewContext (nil , nil ).(* context )
681
+
682
+ r .Find (http .MethodGet , "/notfound" , c )
683
+ c .handler (c )
684
+
685
+ // No routable path, don't set Path.
686
+ assert .Equal (t , "" , c .Path ())
687
+ }
688
+
677
689
func TestRouterParam (t * testing.T ) {
678
690
e := New ()
679
691
r := e .router
You can’t perform that action at this time.
0 commit comments