fasthttp-routing icon indicating copy to clipboard operation
fasthttp-routing copied to clipboard

A fast and powerful routing package for fasthttp servers

Results 6 fasthttp-routing issues
Sort by recently updated
recently updated
newest added

Due to using fasthttp builtin error function which resets the context, no headers were written in the response. This fix introduces new function which does not reset context so all...

As I pointed [here](https://github.com/valyala/fasthttp/issues/444#issuecomment-433172913) the fasthttp-routing uses builtin `Error()` function of `fasthttp.RequestCtx` in it's handler (file `report.go` lines `103` and `105`). This function however completely resets response which introduces problem...

### What i've do: - Fix readme.md for the routeGroup description.

func NotFoundHandler(ctx *routing.Context) error { ctx.WriteString("Not Found:" + strconv.Itoa(http.StatusNotFound)) ctx.Response.SetStatusCode(http.StatusNotFound) return routing.NewHTTPError(http.StatusNotFound) }

I'm using router.Route("route name") method to get the path of the named route. As I understand it returns a &Route struct but path field is not accessible because not exported....

Now, wrapped errors are always handle as 500. I want to fix it. ```go import ( "golang.org/x/xerrors" routing "github.com/qiangxue/fasthttp-routing" "github.com/valyala/fasthttp" ) ... err := routing.NewHTTPError(fasthttp.StatusBadRequest) return xerrors.Errorf("bad request: %w", err)...