Fix NPE when SetsCookie is used and no cookie have been returned by server

Related to #855