mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 19:27:46 +08:00
up
This commit is contained in:
parent
563509c4a6
commit
5856f74d83
@ -263,7 +263,7 @@ func (s *Server) GetRouterArray() []RouterItem {
|
||||
if len(item.handler.middleware) > 0 {
|
||||
for _, v := range item.handler.middleware {
|
||||
if item.Middleware != "" {
|
||||
item.Middleware += "\n"
|
||||
item.Middleware += ","
|
||||
}
|
||||
item.Middleware += gdebug.FuncName(v)
|
||||
}
|
||||
|
@ -80,9 +80,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Close the request and response body
|
||||
// to release the file descriptor in time.
|
||||
request.Request.Body.Close()
|
||||
_ = request.Request.Body.Close()
|
||||
if request.Request.Response != nil {
|
||||
request.Request.Response.Body.Close()
|
||||
_ = request.Request.Response.Body.Close()
|
||||
}
|
||||
}()
|
||||
|
||||
@ -168,7 +168,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// Automatically set the session id to cookie
|
||||
// if it creates a new session id in this request.
|
||||
// if it creates a new session id in this request
|
||||
// and SessionCookieOutput is enabled.
|
||||
if s.config.SessionCookieOutput &&
|
||||
request.Session.IsDirty() &&
|
||||
request.Session.Id() != request.GetSessionId() {
|
||||
|
Loading…
Reference in New Issue
Block a user