added https and cookie parsing