2

I am getting a 404 error from a URL pattern with a quite simple parameter in it.

I am using gin-gonic with golang.

Here is my main programme. I've removed all other routing to isolate the problem.

func main() {
    r := gin.Default()

    r.GET("/action/:id", controllers.ActionHandler)
    r.GET("/home", controllers.Home)

    config.Init()

    r.LoadHTMLGlob("./templates/*/*")

    // routes.AuthRoutes(r)
    
    r.Run("localhost:8080")
}

When the programme runs, the browser recognises "/home". But it does not recognise "/action/demand"

I'm flummoxed

1 Answer 1

0

This seems to be a Firefox cache problem. It is hard to reproduce reliably because it occurs some of the time but not all of the time.

The symptom is that the browser redirects to "/"' and reports a 404 'page not found' in response to the URL "/action/demand"`.

This goes away if I clear the firefox cache. But then recurs.

The problem only seems to occur on firefox

I haven't found a fix yet except to use another browser.

Not the answer you're looking for? Browse other questions tagged or ask your own question.