{"action":"opened","issue":{"url":"https://api.github.com/repos/kerryjiang/SuperWebSocket/issues/12","labels_url":"https://api.github.com/repos/kerryjiang/SuperWebSocket/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/kerryjiang/SuperWebSocket/issues/12/comments","events_url":"https://api.github.com/repos/kerryjiang/SuperWebSocket/issues/12/events","html_url":"https://github.com/kerryjiang/SuperWebSocket/issues/12","id":54836271,"number":12,"title":"System.UriFormatException: 无效的 URI: 字符串中有无效的序列","user":{"login":"tupunco","id":376333,"avatar_url":"https://avatars.githubusercontent.com/u/376333?v=3","gravatar_id":"","url":"https://api.github.com/users/tupunco","html_url":"https://github.com/tupunco","followers_url":"https://api.github.com/users/tupunco/followers","following_url":"https://api.github.com/users/tupunco/following{/other_user}","gists_url":"https://api.github.com/users/tupunco/gists{/gist_id}","starred_url":"https://api.github.com/users/tupunco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tupunco/subscriptions","organizations_url":"https://api.github.com/users/tupunco/orgs","repos_url":"https://api.github.com/users/tupunco/repos","events_url":"https://api.github.com/users/tupunco/events{/privacy}","received_events_url":"https://api.github.com/users/tupunco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-20T02:26:27Z","updated_at":"2015-01-20T02:26:27Z","closed_at":null,"body":"```\r\nFailed to read cookie, key: key_name, value: v=2&v_id=3383628&v_name=%89%5b%b0e%0f%5c%03N.\r\nSystem.UriFormatException: 无效的 URI: 字符串中有无效的序列。\r\n   在 System.Uri.UnescapeString(Char* pStr, Int32 start, Int32 end, Char[] dest, Int32& destPosition, Char rsvd1, Char rsvd2, Char rsvd3, UnescapeMode unescapeMode, UriParser syntax, Boolean isQuery, Boolean readOnlyConfig)\r\n   在 System.Uri.UnescapeDataString(String stringToUnescape)\r\n   在 SuperWebSocket.WebSocketSession`1.SetCookie() 位置 f:\\Work\\Websockets\\SuperWebSocket-master\\SuperWebSocket\\WebSocketSession.cs:行号 353\r\n````\r\n\r\n测试了下 \"%89%5b%b0e%0f%5c%03N\" 这个串Uri.UnescapeDataString()必然出错,\r\n因为这个 Cookie 是多个子Cookie拼合而成的, 示范代码;\r\n\r\n````csharp\r\ncurCookie = current.Request.Cookies[\"key_name\"];\r\ncurCookie[\"v_id\"] = 1111;\r\ncurCookie[\"v_name\"] = HttpUtility.UrlEncode(\"这里是中文\", Encoding.Unicode);\r\ncurrent.Response.Cookies.Add(curCookie);\r\n```` "}}