1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-23 19:04:13 +00:00

setcookie set to unique. fix multi setcookie

This commit is contained in:
astaxie 2013-07-23 21:54:36 +08:00
parent a242f61b8e
commit f46388fa63

View File

@ -95,7 +95,7 @@ func (ctx *Context) SetCookie(name string, value string, others ...interface{})
if len(others) > 4 {
fmt.Fprintf(&b, "; HttpOnly")
}
ctx.SetHeader("Set-Cookie", b.String(), true)
ctx.SetHeader("Set-Cookie", b.String(), false)
}
var cookieNameSanitizer = strings.NewReplacer("\n", "-", "\r", "-")