Cleaned a bit the header cookies code, introducing a WhenHeaders enum