Skip to content

Reverse Routing Panic with 404 route #175

@adam-frisby

Description

@adam-frisby

Reverse routing is panicing on line 324 of router.go

322: for _, route := range router.Routes {
323: // Check that the action matches or is a wildcard.
324: controllerWildcard := route.ControllerName[0] == ':'
325: ...

runtime error: index out of range

The route.ControllerName (and MethodName) never gets assigned for a route with the action is set to 404 (since it cannot be split)

69: actionSplit := strings.Split(action, ".")
70: if len(actionSplit) == 2 {
71: r.ControllerName = actionSplit[0]
72: r.MethodName = actionSplit[1]
73: }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions