Skip to content

Commit

Permalink
fixed Remove method.
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Nov 4, 2017
1 parent 33cec06 commit 5e5f3b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ func (c *Cookies) Set(name, val string, options ...*Options) *Cookies {

// Remove remove the given cookie
func (c *Cookies) Remove(name string, options ...*Options) {
opts := defaultOptions
opts := *defaultOptions // should copy because we will change MaxAge
if len(options) > 0 {
opts = options[0]
opts = *options[0]
}
opts.MaxAge = -1
c.Set(name, "", opts)
c.Set(name, "", &opts)
}

// sign creates a summary with data and sha1 algorithm
Expand Down

0 comments on commit 5e5f3b7

Please sign in to comment.