We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I initialize routes like this:
func (h *HttpSrv) createRoutes() { h.g.Get("/dsp/cpc/:sspId", h.handleGetBids) h.g.Post("/dsp/cpc/:sspId", h.handlePostBids) h.g.Get("/dsp-native/cpc/:sspId", h.handleNativeGetBids) h.g.Post("/dsp-native/cpc/:sspId", h.handleNativePostBids) h.g.Get("/dsp-popunder/cpc/:sspId", h.handlePopunderGetBids) h.g.Post("/dsp-popunder/cpc/:sspId", h.handlePopunderPostBids) } func (h *HttpSrv) handleGetBids(ctx gearbox.Context) { mw, ok := sspinfo.GetSspProcessorsPool().GetPushProcessor(ctx.Param("sspId")) if ok { mw.ExecQueryParamsHandler(ctx) } else { ctx.Status(gearbox.StatusNotFound) } }
And catching the next panic:
panic: runtime error: slice bounds out of range [1:0] goroutine 2027 [running]: github.com/gogearbox/gearbox.(*node).matchRoute(0xc000557c00, 0xc031aa2900, 0x0, 0xc030b9b320, 0xc02e463f68, 0xc032ece400, 0x3) /go/pkg/mod/github.com/gogearbox/gearbox@v1.2.0/tree.go:134 +0x289 github.com/gogearbox/gearbox.(*router).Handler(0xc0005d0c80, 0xc0323d7400) /go/pkg/mod/github.com/gogearbox/gearbox@v1.2.0/router.go:163 +0x745 github.com/valyala/fasthttp.(*Server).serveConn(0xc02e54c000, 0xa69b38, 0xc031106420, 0x0, 0x0) /go/pkg/mod/github.com/valyala/fasthttp@v1.21.0/server.go:2193 +0x128e github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc02e468640, 0xc032c9b0a0) /go/pkg/mod/github.com/valyala/fasthttp@v1.21.0/workerpool.go:223 +0xba github.com/valyala/fasthttp.(*workerPool).getCh.func1(0xc02e468640, 0xc032c9b0a0, 0x905520, 0xc032c9b0a0) /go/pkg/mod/github.com/valyala/fasthttp@v1.21.0/workerpool.go:195 +0x35 created by github.com/valyala/fasthttp.(*workerPool).getCh /go/pkg/mod/github.com/valyala/fasthttp@v1.21.0/workerpool.go:194 +0x11f
What the reason could be?
The text was updated successfully, but these errors were encountered:
Hey @damir-bdr Thanks for raising this issue. I'm going to check it ASAP.
Sorry, something went wrong.
@damir-bdr Can you provide the path of the request you're trying that causes this issue? (e.g. http://localhost:300/dsp-native/cpc/123)
Fixes #86 slicing empty path in matchRoute
331e757
Fixes #86 slicing empty path in matchRoute (#88)
812e8fb
abahmed
Successfully merging a pull request may close this issue.
I initialize routes like this:
And catching the next panic:
What the reason could be?
The text was updated successfully, but these errors were encountered: