summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/cookie/cookie.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/types/cookie/cookie.go b/types/cookie/cookie.go
index 48c8dbf..e8fce93 100644
--- a/types/cookie/cookie.go
+++ b/types/cookie/cookie.go
@@ -91,5 +91,8 @@ func (c *Cookie) Send(data string) error {
// Context gets the underlying context of the cookie
func (c *Cookie) Context() context.Context {
+ if c.H == 0 {
+ return c.ctx
+ }
return context.WithValue(c.ctx, CONTEXTK, c.H)
}