1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 04:40:39 +00:00

Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Eyal Post
2017-05-17 20:02:40 +03:00
11 changed files with 106 additions and 67 deletions

View File

@ -105,7 +105,7 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface
switch {
case maxAge > 0:
fmt.Fprintf(&b, "; Expires=%s; Max-Age=%d", time.Now().Add(time.Duration(maxAge)*time.Second).UTC().Format(time.RFC1123), maxAge)
case maxAge <= 0:
case maxAge < 0:
fmt.Fprintf(&b, "; Max-Age=0")
}
}