Skip to content

Releases: devfeel/dotweb

add Tools include some useful functions

10 May 13:11
ce29e16

Choose a tag to compare

Version 1.7.11

  • Feature: add Tools include some useful functions
  • Feature: add Tools.PrettyJson used to pretty json format view in text
  • Detail: use ctx.Tools() to use Tools
  • 2020-05-10 15:00 at ShangHai

optimize file layout and core/htmx implementation

01 Dec 07:56
101217e

Choose a tag to compare

Version 1.7.10

  • Feature: add Request.ExistsQueryKey used to check is exists from query params with the given key.
  • Opt: optimize file layout, remove module.go
  • Opt: optimize core/htmx implementation
  • Opt: /dotweb/state/interval support pretty mode, you can visit like this: /dotweb/state/interval?pretty
  • 2019-12-01 15:00 at ShangHai

optimize html create code

19 Nov 23:31
68e92aa

Choose a tag to compare

Version 1.7.9

  • Opt: optimize html create code
  • Opt: optimize core.CreateTablePart\core.CreateTableHtml\core.CreateHtml
  • 2019-11-20 07:00 at ShangHai

optimize router code

19 Nov 05:57
0f05666

Choose a tag to compare

Version 1.7.8

  • Opt: optimize tree.go
  • Opt: Fix some panic information when a 'catch-all' wildcard conflict occurs.
  • Opt: use maxParamCount const instead of magic number.
  • Opt: optimize countParams.
  • Opt: optimize incrementChildPrio.
  • Opt: comment style fixes.
  • Opt: improve param name check.
  • Opt: fix maxParams bug.
  • 2019-11-19 12:00 at ShangHai

优化系统路由dotweb/state、dotweb/routers展现方式

12 Nov 09:33
c1c653c

Choose a tag to compare

Version 1.7.7

  • Opt: 优化系统路由dotweb/state、dotweb/routers展现方式,以方便阅读的表格形式输出
  • Feature: 新增core.TableHtml\core.CreateTableHtml()用于生成相关Html代码
  • About:
    • 可访问dotweb/state查看当前实例运行时信息
    • 可访问dotweb/routers查看当前实例注册的所有路由信息
  • 2019-11-12 18:00 at ShangHai

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

09 Nov 16:15
ce067d8

Choose a tag to compare

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

新增支持注册go原生http.HandlerFunc形式的函数

06 Nov 16:19
d564c1d

Choose a tag to compare

Version 1.7.5

  • Feature: Router增加RegisterHandlerFunc,用于支持注册go原生http.HandlerFunc形式的函数
  • Feature: HttpServer增加RegisterHandlerFunc与RegisterRoute
  • Opt: Router增加transferHandlerFunc、transferStaticFileHandler辅助函数
  • Example: 修改example/router增加RegisterHandlerFunc示例
  • About RegisterHandlerFunc
    • Func: RegisterHandlerFunc(routeMethod string, path string, handler http.HandlerFunc) RouterNode
  • How to use RegisterHandlerFunc:
func HandlerFunc(w http.ResponseWriter, r *http.Request){
	w.Write([]byte("go raw http func"))
}

server.RegisterHandlerFunc("GET", "/h/func", HandlerFunc)
  • 2019-11-07 01:00 at ShangHai

HttpServer.RegisterServerFile增加excludeExtension参数,用于设置不希望被访问的文件后缀名

03 Nov 17:24
c4a2ff2

Choose a tag to compare

Version 1.7.4

  • New Feature: HttpServer.RegisterServerFile增加excludeExtension参数,用于设置不希望被访问的文件后缀名
  • Update: 增加ErrNotFound
  • About HttpServer.RegisterServerFile:
    • Demo: server.RegisterServerFile(RouteMethod_GET, "/src/*", "/var/www", nil)
    • Demo: server.RegisterServerFile(RouteMethod_GET, "/src/*filepath", "/var/www", []string{".zip", ".rar"})
    • 当设置excludeExtension为nil时,可访问所有文件
    • 本次更新涉及API变更
  • Fixed for issue #125 & #212
  • 2019-11-04 01:00 at ShangHai

Request.PostBody增加Post内容大小限制,默认为32mb

29 Oct 02:14
a294a93

Choose a tag to compare

Version 1.7.3

  • New Feature: Request.PostBody增加Post内容大小限制,默认为32mb
  • About MaxBodySize:
    • 通过app.HttpServer.SetMaxBodySize设置
    • 默认为 32 << 20 (32 mb)
    • -1 : unlimted
    • 0 : use default value
    • other: use other value
  • 感谢 @wziww 提供 PR
  • 2019-10-29 12:00 at ShangHai

Bug fixed,建议更新

23 Oct 02:40

Choose a tag to compare

Version 1.7.2

  • Bug Fixed: Request.Release()增加对realUrl的处理
  • 2019-10-23 12:00 at ShangHai

Version 1.7.1

  • New Feature: 新增stringx.CompletionRight\CompletionLeft,用于指定长度两侧补齐字符串
  • Update: 完善dotweb/routers系统页,输出method+router格式,类似:"GET /dotweb/routers"
  • 2019-07-27 08:00 at ShangHai