{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/33122","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/33122/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/33122/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/33122/events","html_url":"https://github.com/dotnet/corefx/issues/33122","id":375350980,"node_id":"MDU6SXNzdWUzNzUzNTA5ODA=","number":33122,"title":"HttpWebResponse.Cookies different behavior in .net framework and .net core","user":{"login":"Avemey","id":3456201,"node_id":"MDQ6VXNlcjM0NTYyMDE=","avatar_url":"https://avatars1.githubusercontent.com/u/3456201?v=4","gravatar_id":"","url":"https://api.github.com/users/Avemey","html_url":"https://github.com/Avemey","followers_url":"https://api.github.com/users/Avemey/followers","following_url":"https://api.github.com/users/Avemey/following{/other_user}","gists_url":"https://api.github.com/users/Avemey/gists{/gist_id}","starred_url":"https://api.github.com/users/Avemey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Avemey/subscriptions","organizations_url":"https://api.github.com/users/Avemey/orgs","repos_url":"https://api.github.com/users/Avemey/repos","events_url":"https://api.github.com/users/Avemey/events{/privacy}","received_events_url":"https://api.github.com/users/Avemey/received_events","type":"User","site_admin":false},"labels":[{"id":497898703,"node_id":"MDU6TGFiZWw0OTc4OTg3MDM=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net.Http","name":"area-System.Net.Http","color":"d4c5f9","default":false},{"id":145399957,"node_id":"MDU6TGFiZWwxNDUzOTk5NTc=","url":"https://api.github.com/repos/dotnet/corefx/labels/enhancement","name":"enhancement","color":"207de5","default":true},{"id":181727851,"node_id":"MDU6TGFiZWwxODE3Mjc4NTE=","url":"https://api.github.com/repos/dotnet/corefx/labels/tenet-compatibility","name":"tenet-compatibility","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"node_id":"MDk6TWlsZXN0b25lMTMyODA4MA==","number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"node_id":"MDQ6VXNlcjEzMDI4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":1859,"closed_issues":272,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-11-02T18:41:53Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-10-30T07:17:05Z","updated_at":"2018-11-02T18:43:21Z","closed_at":null,"author_association":"NONE","body":"Environment:\r\nOS: Windows 10 pro\r\n.NET Core: 2.1\r\n.NET Framework: 4.5.1\r\n\r\nHttpWebResponse.Cookies should contains cookies that are associated with response but for .net core this property contains cookies from request and response both.\r\n\r\nExample:\r\n```c#\r\nCookieContainer cookieContainer = new CookieContainer();\r\nUri uri = new Uri(\"https://google.com\");\r\ncookieContainer.SetCookies(uri, \"k1=1111,k2=2222,k3=3333,1P_JAR=zzz\");\r\n\r\nHttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);\r\nrequest.CookieContainer = cookieContainer;\r\nrequest.Method = \"GET\";\r\n\r\nHttpWebResponse response = (HttpWebResponse)request.GetResponse();\r\n\r\nConsole.WriteLine(\"Cookies from response: \");\r\nforeach (Cookie cookie in response.Cookies)\r\n{\r\n    Console.WriteLine(\"    \" + cookie.Name + \": \" + cookie.Value);\r\n}\r\n\r\nConsole.WriteLine(\"Get cookie by name: \" + response.Cookies[\"1P_JAR\"]);\r\n```\r\n\r\nResult for .net framework 4.5.1 (as expected):\r\n```\r\nCookies from response:\r\n    1P_JAR: 2018-10-26-13\r\n    NID: bla-bla-bla\r\nGet cookie by name: 1P_JAR=2018-10-26-13\r\n```\r\n\r\nResult for .net core 2.1 (wrong):\r\n```\r\nCookies from response:\r\n    k1: 1111\r\n    k2: 2222\r\n    k3: 3333\r\n    1P_JAR: zzz\r\n    1P_JAR: 2018-10-26-13\r\n    NID: bla-bla-bla\r\nGet cookie by name: 1P_JAR=zzz\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/435472783","html_url":"https://github.com/dotnet/corefx/issues/33122#issuecomment-435472783","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/33122","id":435472783,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTQ3Mjc4Mw==","user":{"login":"karelz","id":5776068,"node_id":"MDQ6VXNlcjU3NzYwNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T18:43:21Z","updated_at":"2018-11-02T18:43:21Z","author_association":"MEMBER","body":"@Avemey how badly is it impacting your scenarios?\r\nWhile there is a difference from .NET Framework, it is likely not too bad that we return all cookies merged. Or is it?"}}
{"actor":{"display_login":"karelz"}}