diff --git a/cookie.go b/cookie.go index fa70e7c..6612662 100644 --- a/cookie.go +++ b/cookie.go @@ -15,7 +15,6 @@ func newCookieFromOptions(name, value string, options *Options) *http.Cookie { MaxAge: options.MaxAge, Secure: options.Secure, HttpOnly: options.HttpOnly, - Partitioned: options.Partitioned, } } diff --git a/cookie_go111.go b/cookie_go111.go index d5e9e62..9b58828 100644 --- a/cookie_go111.go +++ b/cookie_go111.go @@ -16,7 +16,6 @@ func newCookieFromOptions(name, value string, options *Options) *http.Cookie { Secure: options.Secure, HttpOnly: options.HttpOnly, SameSite: options.SameSite, - Partitioned: options.Partitioned, } } diff --git a/cookie_test.go b/cookie_test.go index 8e02fbc..4294727 100644 --- a/cookie_test.go +++ b/cookie_test.go @@ -14,16 +14,15 @@ func TestNewCookieFromOptions(t *testing.T) { maxAge int secure bool httpOnly bool - partitioned bool }{ - {"", "bar", "/foo/bar", "foo.example.com", 3600, true, true, true}, - {"foo", "", "/foo/bar", "foo.example.com", 3600, true, true, true}, - {"foo", "bar", "", "foo.example.com", 3600, true, true, true}, - {"foo", "bar", "/foo/bar", "", 3600, true, true, true}, - {"foo", "bar", "/foo/bar", "foo.example.com", 0, true, true, true}, - {"foo", "bar", "/foo/bar", "foo.example.com", 3600, false, true, true}, - {"foo", "bar", "/foo/bar", "foo.example.com", 3600, true, false, true}, - {"foo", "bar", "/foo/bar", "foo.example.com", 3600, true, true, false}, + {"", "bar", "/foo/bar", "foo.example.com", 3600, true, true}, + {"foo", "", "/foo/bar", "foo.example.com", 3600, true, true}, + {"foo", "bar", "", "foo.example.com", 3600, true, true}, + {"foo", "bar", "/foo/bar", "", 3600, true, true}, + {"foo", "bar", "/foo/bar", "foo.example.com", 0, true, true}, + {"foo", "bar", "/foo/bar", "foo.example.com", 3600, false, true}, + {"foo", "bar", "/foo/bar", "foo.example.com", 3600, true, false}, + {"foo", "bar", "/foo/bar", "foo.example.com", 3600, true, true}, } for i, v := range tests { options := &Options{ @@ -32,7 +31,6 @@ func TestNewCookieFromOptions(t *testing.T) { MaxAge: v.maxAge, Secure: v.secure, HttpOnly: v.httpOnly, - Partitioned: v.partitioned, } cookie := newCookieFromOptions(v.name, v.value, options) if cookie.Name != v.name { @@ -56,8 +54,5 @@ func TestNewCookieFromOptions(t *testing.T) { if cookie.HttpOnly != v.httpOnly { t.Fatalf("%v: bad cookie httpOnly: got %v, want %v", i+1, cookie.HttpOnly, v.httpOnly) } - if cookie.Partitioned != v.partitioned { - t.Fatalf("%v: bad cookie partitioned: got %v, want %v", i+1, cookie.Partitioned, v.partitioned) - } } } diff --git a/options.go b/options.go index ec07068..d33d076 100644 --- a/options.go +++ b/options.go @@ -16,5 +16,4 @@ type Options struct { MaxAge int Secure bool HttpOnly bool - Partitioned bool } diff --git a/options_go111.go b/options_go111.go index 3214990..af9cdf0 100644 --- a/options_go111.go +++ b/options_go111.go @@ -18,7 +18,6 @@ type Options struct { MaxAge int Secure bool HttpOnly bool - Partitioned bool // Defaults to http.SameSiteDefaultMode SameSite http.SameSite } diff --git a/vendor/github.com/gorilla/securecookie/README.md b/vendor/github.com/gorilla/securecookie/README.md index 62e4ec7..c3b9815 100644 --- a/vendor/github.com/gorilla/securecookie/README.md +++ b/vendor/github.com/gorilla/securecookie/README.md @@ -55,7 +55,6 @@ func SetCookieHandler(w http.ResponseWriter, r *http.Request) { Path: "/", Secure: true, HttpOnly: true, - Partitioned: true, } http.SetCookie(w, cookie) }