Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ type NotFoundHandle func(http.ResponseWriter, *http.Request)
## Dependency
websocket - golang.org/x/net/websocket - 内置vendor
<br>
redis - github.com/garyburd/redigo - 需自行go get
redis - github.com/garyburd/redigo - go get自动下载
<br>
yaml - gopkg.in/yaml.v2 - 需自行go get
yaml - gopkg.in/yaml.v2 - go get自动下载

## 相关项目
#### <a href="https://github.com/devfeel/longweb" target="_blank">LongWeb</a>
Expand Down
2 changes: 1 addition & 1 deletion consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (

//Http define
const (
CharsetUTF8 = "text/plain; charset=utf-8"
CharsetUTF8 = "charset=utf-8"
DefaultServerName = "dotweb"
)

Expand Down
5 changes: 5 additions & 0 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func main() {
ctx.Response().Write(http.StatusNotFound, []byte("is't app's not found!"))
})

app.SetExceptionHandle(func(ctx dotweb.Context, err error) {
ctx.Response().SetContentType(dotweb.MIMEApplicationJSONCharsetUTF8)
ctx.WriteJsonC(http.StatusInternalServerError, err.Error())
})

//设置HttpModule
//InitModule(app)

Expand Down
5 changes: 5 additions & 0 deletions version.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## dotweb版本记录:

#### Version 1.4.9.2
* 修复BUG for #112
* 调整CharsetUTF8值为"charset=utf-8"
* 2018-03-28 09:00

#### Version 1.4.9.1
* 内置Vendor目录仅保留 golang.org/x/net包,移除redis与yaml包
* 完善RedisClient接口能力
Expand Down