You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under specific conditions and wrong html header, a routes is executed multiple times
Checklist
[ Y] Dependencies installed
[ Y] No typos
[ Y] Searched existing issues and docs
Expected behaviour
Handler should be called once
Actual behaviour
Handler gets Called once, then another 3 times within microseconds?
Steps to reproduce
I have no idea, why. The Code Explains some debugging atempts
Tested with Chrome and Firefox
Working code to debug
e.GET("/test/:uid", db.TestAlertGet, db.Auth) // Has a Buge.GET("/hello", db.TestAlertGet, db.Auth) // (For test) Same Handler on another route Has no bug!!!// I also disabled all other handler to see if I still have that confilct.// The problem functionfunc (p*Pgx) TestAlertGet(c echo.Context) error {
uid:="404b1175-60c6-4c34-99f4-2371045bb1a1"//c.Param("uid") changed to Static to see if c.Param causing the bug.userId:=c.Get("ID").(int64)
res, err:=p.q.GetApiFromWebhookId(ctx, qq.GetApiFromWebhookIdParams{
WebhookID: uid,
UserID: userId,
})
iferr!=nil {
log.Println(err)
}
// I only get the Bug when I render a Template!err=c.Render(200, "alert_test.html", TemplateData[qq.GetApiFromWebhookIdRow]{
Title: "Test",
Error: "",
Data: res,
})
iferr!=nil {
log.Println(err)
}
returnerr
}
Edit: The Function gets called for every .css file I locally serve. Removing them fixes the multiple Calls .
Edit2: Fixed it
I included the stylsheets wrong
<linkrel="stylesheet" href="main.css"> | false gets the error
<linkrel="stylesheet" href="/main.css"> | correct no bugs anymore
But still I am confused why under some conditions a fault in my HTML Header leads to the function being called multiple times.
The text was updated successfully, but these errors were encountered:
Issue Description
Under specific conditions and wrong html header, a routes is executed multiple times
Checklist
Expected behaviour
Handler should be called once
Actual behaviour
Handler gets Called once, then another 3 times within microseconds?
Steps to reproduce
I have no idea, why. The Code Explains some debugging atempts
Tested with Chrome and Firefox
Working code to debug
Edit: The Function gets called for every .css file I locally serve. Removing them fixes the multiple Calls .
Edit2: Fixed it
But still I am confused why under some conditions a fault in my HTML Header leads to the function being called multiple times.
The text was updated successfully, but these errors were encountered: