Modified so that the cookie request header is used if no data is specified