mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Document that the cookie passed to ResponseHeader.SetCookie may be re-used after the function returns
This commit is contained in:
@@ -946,6 +946,8 @@ func (h *ResponseHeader) SetCanonical(key, value []byte) {
|
||||
}
|
||||
|
||||
// SetCookie sets the given response cookie.
|
||||
//
|
||||
// It is save re-using the cookie after the function returns.
|
||||
func (h *ResponseHeader) SetCookie(cookie *Cookie) {
|
||||
h.cookies = setArgBytes(h.cookies, cookie.Key(), cookie.Cookie())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user