{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/4934","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/4934/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/4934/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/4934/events","html_url":"https://github.com/dotnet/corefx/issues/4934","id":121616912,"number":4934,"title":"Got System.IO.Exception When Expecting a Not-Found Response","user":{"login":"shmao","id":12262109,"avatar_url":"https://avatars.githubusercontent.com/u/12262109?v=3","gravatar_id":"","url":"https://api.github.com/users/shmao","html_url":"https://github.com/shmao","followers_url":"https://api.github.com/users/shmao/followers","following_url":"https://api.github.com/users/shmao/following{/other_user}","gists_url":"https://api.github.com/users/shmao/gists{/gist_id}","starred_url":"https://api.github.com/users/shmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shmao/subscriptions","organizations_url":"https://api.github.com/users/shmao/orgs","repos_url":"https://api.github.com/users/shmao/repos","events_url":"https://api.github.com/users/shmao/events{/privacy}","received_events_url":"https://api.github.com/users/shmao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"davidsh","id":7684835,"avatar_url":"https://avatars.githubusercontent.com/u/7684835?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsh","html_url":"https://github.com/davidsh","followers_url":"https://api.github.com/users/davidsh/followers","following_url":"https://api.github.com/users/davidsh/following{/other_user}","gists_url":"https://api.github.com/users/davidsh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsh/subscriptions","organizations_url":"https://api.github.com/users/davidsh/orgs","repos_url":"https://api.github.com/users/davidsh/repos","events_url":"https://api.github.com/users/davidsh/events{/privacy}","received_events_url":"https://api.github.com/users/davidsh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestones/Future","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"number":5,"title":"Future","description":"Milestone tracking the issues triaged for an unspecified future release","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","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":562,"closed_issues":169,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2016-06-02T16:52:02Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2015-12-11T01:38:55Z","updated_at":"2016-06-02T16:52:03Z","closed_at":"2016-06-02T16:52:02Z","body":"https://github.com/dotnet/wcf/issues/87 seems caused by an issue in System.Net. I have a repro for the issue. To repro the issue, you can add the following test in System.Net.Http.Functional.Tests and run the test. \r\n\r\n```csharp\r\n        [Theory, MemberData(\"VerifyUploadServersStreamsAndExpectedData\")]\r\n        public async Task PostAsync_CallMethod_StreamContent_NotFound(Uri remoteServer, Stream requestContentStream, byte[] expectedData)\r\n        {\r\n            int contentLenght = 1000000;\r\n            using (var client = new HttpClient())\r\n            {\r\n                // Ensure the service start\r\n                HttpContent content = content = new StringContent(\r\n                        \"\",\r\n                        Encoding.UTF8,\r\n                        \"application/json\");\r\n                client.PutAsync(\"http://localhost:44283/resource/WcfService.TestResources.BasicHttpResource\", content).GetAwaiter().GetResult();\r\n\r\n                content = new StringContent(new string('a', contentLenght));\r\n                content.Headers.ContentMD5 = TestHelper.ComputeMD5Hash(expectedData);\r\n\r\n                using (HttpResponseMessage response = await client.PostAsync(new Uri(\"http://localhost:8081/BridgeAppDomain0/Basicnot-an-endpoint\"), content))\r\n                {\r\n                    Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);\r\n                }\r\n            }\r\n        }\r\n```\r\nNote that the test needs to use WCF's bridge service to repro the issue. The service is available on [One Drive](https://onedrive.live.com/redir?resid=CE2984E291F58617!3365&authkey=!ACO_zktAGj0aTZI&ithint=folder%2c). To start the service, download the 'bridge folder', and run the script SetupWCFTestService.cmd in bridge\\tools. You need to start the service on your machine before running the test.\r\n\r\nExpect: the test passes.\r\nActual: the test fails.\r\n\r\nPlease feel free to contact me if you have any questions. Thanks."}}
{"actor":{"display_login":"davidsh"}}