Ignore invalid cookie attributes

If a cookie contains an invalid attribute the current code throws an System.IndexOutOfRangeException.
Why are attributes other then HttpOnly and Secure not accepted?

I see this error frequently in my logging, so I propose to just ignore all attributes.