Title: UploadFileTask with Stream fails to upload files · Issue #129 · DropNet/DropNet · GitHub
Open Graph Title: UploadFileTask with Stream fails to upload files · Issue #129 · DropNet/DropNet
X Title: UploadFileTask with Stream fails to upload files · Issue #129 · DropNet/DropNet
Description: The WebRequest is invalid, since it sets a wrong value to the Content-Length header. In the sample below, it sets it to 339 bytes, instead of 329 bytes. Notice that the overloaded method that accepts a byte[] works correctly. Here's a fa...
Open Graph Description: The WebRequest is invalid, since it sets a wrong value to the Content-Length header. In the sample below, it sets it to 339 bytes, instead of 329 bytes. Notice that the overloaded method that accep...
X Description: The WebRequest is invalid, since it sets a wrong value to the Content-Length header. In the sample below, it sets it to 339 bytes, instead of 329 bytes. Notice that the overloaded method that accep...
Opengraph URL: https://github.com/DropNet/DropNet/issues/129
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UploadFileTask with Stream fails to upload files","articleBody":"The WebRequest is invalid, since it sets a wrong value to the Content-Length header. In the sample below, it sets it to 339 bytes, instead of 329 bytes. Notice that the overloaded method that accepts a byte[] works correctly.\n\nHere's a failing test:\n\n```\n [TestMethod]\n public void Can_Upload_File_Task_FAILS()\n {\n var localFile = new FileInfo(_fixture.CreateAnonymous\u003cstring\u003e());\n var localContent = _fixture.CreateAnonymous\u003cstring\u003e();\n\n File.WriteAllText(localFile.FullName, localContent, System.Text.Encoding.UTF8);\n Assert.IsTrue(File.Exists(localFile.FullName));\n\n using (var stream = new FileStream(localFile.FullName, FileMode.Open, FileAccess.Read, FileShare.Read))\n {\n var uploadTask = _client.UploadFileTask(\"/Test\", localFile.Name, stream);\n uploadTask.Wait();\n\n Assert.IsNotNull(uploadTask.Result);\n }\n }\n```\n","author":{"url":"https://github.com/saguiitay","@type":"Person","name":"saguiitay"},"datePublished":"2014-06-02T09:14:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/129/DropNet/issues/129"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e301b937-cd24-4ee8-9b47-dc09b1e2a710 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB56:2EA89:2436883:2EB4026:697E32FB |
| html-safe-nonce | 871685017ffefd5969da231dae654a69210b390af7df9f82fc621aead3be0599 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjU2OjJFQTg5OjI0MzY4ODM6MkVCNDAyNjo2OTdFMzJGQiIsInZpc2l0b3JfaWQiOiI2ODkwODQyNzU1NjcyNDQwMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b8695f8aba34719a56dd89a9297fa231b294c3385abc899f6ca398fcd216d798 |
| hovercard-subject-tag | issue:34756494 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DropNet/DropNet/129/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f984aa858653d47cf13ec6d732d7a847d00bd9f34fb18fec2ba7da5383a33ed5/DropNet/DropNet/issues/129 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f984aa858653d47cf13ec6d732d7a847d00bd9f34fb18fec2ba7da5383a33ed5/DropNet/DropNet/issues/129 |
| og:image:alt | The WebRequest is invalid, since it sets a wrong value to the Content-Length header. In the sample below, it sets it to 339 bytes, instead of 329 bytes. Notice that the overloaded method that accep... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | saguiitay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/DropNet/DropNet git https://github.com/DropNet/DropNet.git |
| octolytics-dimension-user_id | 7176748 |
| octolytics-dimension-user_login | DropNet |
| octolytics-dimension-repository_id | 678462 |
| octolytics-dimension-repository_nwo | DropNet/DropNet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 678462 |
| octolytics-dimension-repository_network_root_nwo | DropNet/DropNet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width