DestorySession delete all contents of the session and set the sessionId to empty
()
| 329 | |
| 330 | // DestorySession delete all contents of the session and set the sessionId to empty |
| 331 | func (ctx *HttpContext) DestorySession() error { |
| 332 | if ctx.httpServer != nil { |
| 333 | ctx.Session().Clear() |
| 334 | if err := ctx.HttpServer().sessionManager.RemoveSessionState(ctx.SessionID()); err != nil { |
| 335 | return err |
| 336 | } |
| 337 | ctx.sessionID = "" |
| 338 | ctx.SetCookieValue(session.DefaultSessionCookieName, "", -1) |
| 339 | } |
| 340 | return nil |
| 341 | } |
| 342 | |
| 343 | // Hijack make current connection to hijack mode |
| 344 | func (ctx *HttpContext) Hijack() (*HijackConn, error) { |
nothing calls this directly
no test coverage detected