Fixes parsing cookies from headers

There was a bug examining a cookie name set from headers.