Skip to content

Commit 53542ce

Browse files
committed
Version 1.3.5
* 提升UUID性能,调整UUID算法,新增UUID包 * HttpServer新增设置是否启用唯一请求ID,默认不开启,开启后使用32位UUID,通过ctx.RequestID获取 * 提供HttpServer.SetEnabledRequestID()函数 * 提供uuid.V1\V2\V3\V4四类算法 * move example/exception to devfeel/dotweb-example * move example/uploadfile to devfeel/dotweb-example * add cookbook link * 2017-11-02 16:00
1 parent 1dd1ecc commit 53542ce

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ func (r *router) wrapWebSocketHandle(handler HttpHandle) websocket.Handler {
528528
//get from pool
529529
req := r.server.pool.request.Get().(*Request)
530530
httpCtx := r.server.pool.context.Get().(*HttpContext)
531-
req.reset(ws.Request(), httpCtx)
532531
httpCtx.reset(nil, req, r.server, nil, nil, handler)
532+
req.reset(ws.Request(), httpCtx)
533533
httpCtx.webSocket = &WebSocket{
534534
Conn: ws,
535535
}

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ func (server *HttpServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
140140
response := server.pool.response.Get().(*Response)
141141
request := server.pool.request.Get().(*Request)
142142
httpCtx := server.pool.context.Get().(*HttpContext)
143+
httpCtx.reset(response, request, server, nil, nil, nil)
143144
response.reset(w)
144145
request.reset(req, httpCtx)
145-
httpCtx.reset(response, request, server, nil, nil, nil)
146146

147147
//处理前置Module集合
148148
for _, module := range server.Modules {

0 commit comments

Comments
 (0)