aboutsummaryrefslogtreecommitdiff
path: root/cookie.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-05 12:12:15 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-05 12:12:15 +0200
commitdfec0d9d36847ce8313d354856854be5935f1c44 (patch)
treeb81e5ab88ead3efa89dd5e5bd56b655b237eb85e /cookie.go
parentAdded response cookies support (diff)
downloadfasthttp-dfec0d9d36847ce8313d354856854be5935f1c44.tar.gz
fasthttp-dfec0d9d36847ce8313d354856854be5935f1c44.tar.bz2
fasthttp-dfec0d9d36847ce8313d354856854be5935f1c44.zip
Eliminated redundant memory allocation during cookie expiration time parsing
Diffstat (limited to 'cookie.go')
-rw-r--r--cookie.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cookie.go b/cookie.go
index 57d964b..116f6a5 100644
--- a/cookie.go
+++ b/cookie.go
@@ -98,7 +98,7 @@ func (c *Cookie) Parse(src []byte) error {
switch {
case bytes.Equal(strCookieExpires, kv.key):
v := unsafeBytesToStr(kv.value)
- exptime, err := time.Parse(time.RFC1123, v)
+ exptime, err := time.ParseInLocation(time.RFC1123, v, gmtLocation)
if err != nil {
return err
}