From 60e1d9e3616d042da061239864f58c91dd2951c8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 20 Jan 2025 16:13:31 +0100 Subject: [PATCH] Broaden an error condition `http.ErrNoCookie` isn't the only possible error value. --- internal/http/request/cookie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http/request/cookie.go b/internal/http/request/cookie.go index b5b234e0..fa7cb719 100644 --- a/internal/http/request/cookie.go +++ b/internal/http/request/cookie.go @@ -8,7 +8,7 @@ import "net/http" // CookieValue returns the cookie value. func CookieValue(r *http.Request, name string) string { cookie, err := r.Cookie(name) - if err == http.ErrNoCookie { + if err != nil { return "" }