ing
This commit is contained in:
parent
e7d766bf07
commit
5154784254
|
@ -138,10 +138,15 @@ func (s *Server) httpHandler(ctx *fasthttp.RequestCtx) {
|
|||
servlet Servlet
|
||||
)
|
||||
|
||||
if string(ctx.Method()) == "OPTIONS" && ctx.Request.Header.Peek("Access-Control-Request-Method") != nil {
|
||||
ctx.SetStatusCode(fasthttp.StatusOK)
|
||||
}
|
||||
|
||||
if servlet = s.ServerHandler.Servlet(s.ctx, ctx); nil == servlet {
|
||||
s.onError(ctx, web.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found")))
|
||||
return
|
||||
}
|
||||
|
||||
servletCtx := servlet.ServletCtx(s.ctx)
|
||||
|
||||
if err := servlet.Handle(servletCtx, ctx); nil != err {
|
||||
|
|
Loading…
Reference in New Issue
Block a user