Skip to content

修复在调用SetMethodNotAllowedHandle时修改StatusCode无效问题

Choose a tag to compare

@devfeel devfeel released this 09 Nov 16:15
· 113 commits to master since this release
ce067d8

Version 1.7.6

  • Fix: 修复在调用SetMethodNotAllowedHandle时修改StatusCode无效问题
  • Opt: 将路由阶段设置405代码逻辑移除,相关逻辑在DefaultMethodNotAllowedHandler实现
  • About MethodNotAllowedHandle:
    • 默认使用DefaultMethodNotAllowedHandler
    • 如调用SetMethodNotAllowedHandle,则使用用户代码覆盖DefaultMethodNotAllowedHandler
  • How to use SetMethodNotAllowedHandle:
app.SetMethodNotAllowedHandle(func(ctx dotweb.Context){
    ctx.Redirect(301, "/")
})
  • 2019-11-10 00:00 at ShangHai