small bugfixes in HTTP library and cookie handling