fix null pointer dereference (segfault) when Cookie header is empty