{"action":"created","issue":{"url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/321","repository_url":"https://api.github.com/repos/hongyangAndroid/okhttputils","labels_url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/321/comments","events_url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/321/events","html_url":"https://github.com/hongyangAndroid/okhttputils/issues/321","id":179947692,"number":321,"title":"Cookie持久化管理有问题，不能正常保存Cookie","user":{"login":"yxzfyboy","id":22513385,"avatar_url":"https://avatars.githubusercontent.com/u/22513385?v=3","gravatar_id":"","url":"https://api.github.com/users/yxzfyboy","html_url":"https://github.com/yxzfyboy","followers_url":"https://api.github.com/users/yxzfyboy/followers","following_url":"https://api.github.com/users/yxzfyboy/following{/other_user}","gists_url":"https://api.github.com/users/yxzfyboy/gists{/gist_id}","starred_url":"https://api.github.com/users/yxzfyboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxzfyboy/subscriptions","organizations_url":"https://api.github.com/users/yxzfyboy/orgs","repos_url":"https://api.github.com/users/yxzfyboy/repos","events_url":"https://api.github.com/users/yxzfyboy/events{/privacy}","received_events_url":"https://api.github.com/users/yxzfyboy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-29T04:02:12Z","updated_at":"2016-10-20T02:19:48Z","closed_at":null,"body":"PersistentCookieStore类中添加cookie有问题，代码如下：\r\n\r\n    protected void add(HttpUrl uri, Cookie cookie)\r\n    {\r\n        String name = getCookieToken(cookie);\r\n\r\n        if (!cookie.persistent())\r\n        {\r\n            if (!cookies.containsKey(uri.host()))\r\n            {\r\n                cookies.put(uri.host(), new ConcurrentHashMap<String, Cookie>());\r\n            }\r\n            cookies.get(uri.host()).put(name, cookie);\r\n        } else\r\n        {\r\n            if (cookies.containsKey(uri.host()))\r\n            {\r\n                cookies.get(uri.host()).remove(name);\r\n            }else\r\n            {\r\n                return ;\r\n            }\r\n        }\r\n\r\n        // Save cookie into persistent store\r\n        SharedPreferences.Editor prefsWriter = cookiePrefs.edit();\r\n        prefsWriter.putString(uri.host(), TextUtils.join(\",\", cookies.get(uri.host()).keySet()));\r\n        prefsWriter.putString(COOKIE_NAME_PREFIX + name, encodeCookie(new SerializableHttpCookie(cookie)));\r\n        prefsWriter.apply();\r\n    }\r\n\r\n代码中持久化判断应该去掉!"},"comment":{"url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/comments/254991886","html_url":"https://github.com/hongyangAndroid/okhttputils/issues/321#issuecomment-254991886","issue_url":"https://api.github.com/repos/hongyangAndroid/okhttputils/issues/321","id":254991886,"user":{"login":"ghyzx","id":5229158,"avatar_url":"https://avatars.githubusercontent.com/u/5229158?v=3","gravatar_id":"","url":"https://api.github.com/users/ghyzx","html_url":"https://github.com/ghyzx","followers_url":"https://api.github.com/users/ghyzx/followers","following_url":"https://api.github.com/users/ghyzx/following{/other_user}","gists_url":"https://api.github.com/users/ghyzx/gists{/gist_id}","starred_url":"https://api.github.com/users/ghyzx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghyzx/subscriptions","organizations_url":"https://api.github.com/users/ghyzx/orgs","repos_url":"https://api.github.com/users/ghyzx/repos","events_url":"https://api.github.com/users/ghyzx/events{/privacy}","received_events_url":"https://api.github.com/users/ghyzx/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T02:19:48Z","updated_at":"2016-10-20T02:19:48Z","body":"目前只能用存在内存中的那个（MemoryCookieStore），但愿作者早日处理Cookie持久化问题"}}
{"actor":{"display_login":"ghyzx"}}