HH-46051 handle invalid cookie name of value

См. как сделано в джанге https://github.com/django/django/commit/f2a44528825ac07ca28c8bb7dc01b4375df8dc2c#diff-794cc622b2b516e35587c39381acafa8R49 и траке http://trac.edgewall.org/ticket/2256#comment:8