Pass URI along with header when setting received cookies
Use an intermediate function for setting cookies in connectors