{"action":"created","issue":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/2517","repository_url":"https://api.github.com/repos/NancyFx/Nancy","labels_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2517/labels{/name}","comments_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2517/comments","events_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2517/events","html_url":"https://github.com/NancyFx/Nancy/issues/2517","id":167732602,"number":2517,"title":"Limit size of http Post / File Upload - Nancy.Self-Hosted","user":{"login":"CristianPietrobon","id":17195718,"avatar_url":"https://avatars.githubusercontent.com/u/17195718?v=3","gravatar_id":"","url":"https://api.github.com/users/CristianPietrobon","html_url":"https://github.com/CristianPietrobon","followers_url":"https://api.github.com/users/CristianPietrobon/followers","following_url":"https://api.github.com/users/CristianPietrobon/following{/other_user}","gists_url":"https://api.github.com/users/CristianPietrobon/gists{/gist_id}","starred_url":"https://api.github.com/users/CristianPietrobon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristianPietrobon/subscriptions","organizations_url":"https://api.github.com/users/CristianPietrobon/orgs","repos_url":"https://api.github.com/users/CristianPietrobon/repos","events_url":"https://api.github.com/users/CristianPietrobon/events{/privacy}","received_events_url":"https://api.github.com/users/CristianPietrobon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T23:04:07Z","updated_at":"2016-08-06T14:44:48Z","closed_at":null,"body":"### Prerequisites\r\n\r\n- [x] I have written a descriptive issue title\r\n- [x] I have verified that I am running the latest version of Nancy\r\n- [ ] I have verified if the problem exist in both `DEBUG` and `RELEASE` mode\r\n- [x] I have searched [open](https://github.com/NancyFx/Nancy/issues) and [closed](https://github.com/NancyFx/Nancy/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported\r\n\r\n### Description\r\nHow to limit the http Post / File upload without receiving all the Http form / Post data\r\n\r\n### Steps to Reproduce\r\nWe need to limit the amount of incoming data to few MB maximum (server check).\r\nThis will prevent malicious user to post very large file/form and make damage to server bandwidth.\r\nRight now i didn't found a way to close the connection / stop client and return error. \r\n\r\nexample:\r\nsomething like php_value post_max_size 20M\r\n\r\nHttp request should contain the \"set content length\" that can be checked before accepting the request so, there's a way to check that parameter before any action is taken under Nancy?\r\n\r\n### System Configuration\r\n\r\n- Nancy version:\r\n- Nancy host\r\n  - [ ] ASP.NET\r\n  - [ ] OWIN\r\n  - [X] Self-Hosted\r\n  - [ ] Other:\r\n- Other Nancy packages and versions: 1.4.3\r\n- Environment (Operating system, version and so on): Windows / Linux(mono)\r\n- .NET Framework version: 4.6.1\r\n- Additional information:\r\n\r\n<!-- Thanks for reporting the issue to Nancy! -->\r\n"},"comment":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/comments/238026717","html_url":"https://github.com/NancyFx/Nancy/issues/2517#issuecomment-238026717","issue_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2517","id":238026717,"user":{"login":"CristianPietrobon","id":17195718,"avatar_url":"https://avatars.githubusercontent.com/u/17195718?v=3","gravatar_id":"","url":"https://api.github.com/users/CristianPietrobon","html_url":"https://github.com/CristianPietrobon","followers_url":"https://api.github.com/users/CristianPietrobon/followers","following_url":"https://api.github.com/users/CristianPietrobon/following{/other_user}","gists_url":"https://api.github.com/users/CristianPietrobon/gists{/gist_id}","starred_url":"https://api.github.com/users/CristianPietrobon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristianPietrobon/subscriptions","organizations_url":"https://api.github.com/users/CristianPietrobon/orgs","repos_url":"https://api.github.com/users/CristianPietrobon/repos","events_url":"https://api.github.com/users/CristianPietrobon/events{/privacy}","received_events_url":"https://api.github.com/users/CristianPietrobon/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T14:44:48Z","updated_at":"2016-08-06T14:44:48Z","body":"Thank you, this will be surely help."}}
{"actor":{"display_login":"CristianPietrobon"}}