{"action":"created","issue":{"url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/3","repository_url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin","labels_url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/3/comments","events_url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/3/events","html_url":"https://github.com/stakach/IIS-X-Sendfile-plugin/issues/3","id":112870928,"number":3,"title":"Byte-range requests and Content-length","user":{"login":"dhastings","id":691220,"avatar_url":"https://avatars.githubusercontent.com/u/691220?v=3","gravatar_id":"","url":"https://api.github.com/users/dhastings","html_url":"https://github.com/dhastings","followers_url":"https://api.github.com/users/dhastings/followers","following_url":"https://api.github.com/users/dhastings/following{/other_user}","gists_url":"https://api.github.com/users/dhastings/gists{/gist_id}","starred_url":"https://api.github.com/users/dhastings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhastings/subscriptions","organizations_url":"https://api.github.com/users/dhastings/orgs","repos_url":"https://api.github.com/users/dhastings/repos","events_url":"https://api.github.com/users/dhastings/events{/privacy}","received_events_url":"https://api.github.com/users/dhastings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-22T19:13:34Z","updated_at":"2016-03-11T13:00:00Z","closed_at":null,"body":"Hi there, \r\n\r\nFirst off, thank you for creating this plugin, I appreciate your work very much on this.\r\n\r\nI noticed an issue with the response headers returned by the plugin. If I make a request with: Range: bytes=0-1 on a file that is 50000 bytes, the response shows Content-Length: 50000 when it should show Content-Length: 2\r\n\r\nIn your code on line 101:\r\nresponse.AddHeader(\"Content-Length\", file.Length.ToString());\r\n\r\nIf a byte-range request is detected, it should use the length of the range instead of the length of the file.\r\n\r\nI'd make this change myself but I don't develop in C# or .NET and don't have the appropriate tools. If you make the change I'll test it straight away.\r\n\r\nOnce again, thanks greatly for your work!\r\n"},"comment":{"url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/comments/195354657","html_url":"https://github.com/stakach/IIS-X-Sendfile-plugin/issues/3#issuecomment-195354657","issue_url":"https://api.github.com/repos/stakach/IIS-X-Sendfile-plugin/issues/3","id":195354657,"user":{"login":"smcguire36","id":915298,"avatar_url":"https://avatars.githubusercontent.com/u/915298?v=3","gravatar_id":"","url":"https://api.github.com/users/smcguire36","html_url":"https://github.com/smcguire36","followers_url":"https://api.github.com/users/smcguire36/followers","following_url":"https://api.github.com/users/smcguire36/following{/other_user}","gists_url":"https://api.github.com/users/smcguire36/gists{/gist_id}","starred_url":"https://api.github.com/users/smcguire36/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcguire36/subscriptions","organizations_url":"https://api.github.com/users/smcguire36/orgs","repos_url":"https://api.github.com/users/smcguire36/repos","events_url":"https://api.github.com/users/smcguire36/events{/privacy}","received_events_url":"https://api.github.com/users/smcguire36/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T13:00:00Z","updated_at":"2016-03-11T13:00:00Z","body":"Thanks.  I will try it out and let you know."}}