From 53542ceedcdac49477321bd42fd7bac9af173197 Mon Sep 17 00:00:00 2001 From: "pzrr@qq.com" Date: Thu, 2 Nov 2017 16:11:07 +0800 Subject: [PATCH] =?UTF-8?q?Version=201.3.5=20*=20=E6=8F=90=E5=8D=87UUID?= =?UTF-8?q?=E6=80=A7=E8=83=BD=EF=BC=8C=E8=B0=83=E6=95=B4UUID=E7=AE=97?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E6=96=B0=E5=A2=9EUUID=E5=8C=85=20*=20HttpSer?= =?UTF-8?q?ver=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E5=94=AF=E4=B8=80=E8=AF=B7=E6=B1=82ID?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=BC=80=E5=90=AF=EF=BC=8C?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=90=8E=E4=BD=BF=E7=94=A832=E4=BD=8DUUID?= =?UTF-8?q?=EF=BC=8C=E9=80=9A=E8=BF=87ctx.RequestID=E8=8E=B7=E5=8F=96=20*?= =?UTF-8?q?=20=E6=8F=90=E4=BE=9BHttpServer.SetEnabledRequestID()=E5=87=BD?= =?UTF-8?q?=E6=95=B0=20*=20=E6=8F=90=E4=BE=9Buuid.V1\V2\V3\V4=E5=9B=9B?= =?UTF-8?q?=E7=B1=BB=E7=AE=97=E6=B3=95=20*=20move=20example/exception=20to?= =?UTF-8?q?=20devfeel/dotweb-example=20*=20move=20example/uploadfile=20to?= =?UTF-8?q?=20devfeel/dotweb-example=20*=20add=20cookbook=20link=20*=20201?= =?UTF-8?q?7-11-02=2016:00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router.go | 2 +- server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/router.go b/router.go index 31d50bc..7c4f9b7 100644 --- a/router.go +++ b/router.go @@ -528,8 +528,8 @@ func (r *router) wrapWebSocketHandle(handler HttpHandle) websocket.Handler { //get from pool req := r.server.pool.request.Get().(*Request) httpCtx := r.server.pool.context.Get().(*HttpContext) - req.reset(ws.Request(), httpCtx) httpCtx.reset(nil, req, r.server, nil, nil, handler) + req.reset(ws.Request(), httpCtx) httpCtx.webSocket = &WebSocket{ Conn: ws, } diff --git a/server.go b/server.go index 7ec1806..586d751 100644 --- a/server.go +++ b/server.go @@ -140,9 +140,9 @@ func (server *HttpServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { response := server.pool.response.Get().(*Response) request := server.pool.request.Get().(*Request) httpCtx := server.pool.context.Get().(*HttpContext) + httpCtx.reset(response, request, server, nil, nil, nil) response.reset(w) request.reset(req, httpCtx) - httpCtx.reset(response, request, server, nil, nil, nil) //处理前置Module集合 for _, module := range server.Modules {