{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/39421616","id":39421616,"diff_hunk":"@@ -743,6 +743,135 @@ def test_get_host_suggestion_of_allowed_host(self):\n         )\n \n \n+class DataUploadMaxMemorySizeGetTests(SimpleTestCase):\n+\n+    def _test_data_upload_max_memory_size_exceeded(self, content_length_header):\n+        request = WSGIRequest({\n+            'REQUEST_METHOD': 'GET',\n+            'wsgi.input': BytesIO(b''),\n+            content_length_header: 3,\n+        })\n+\n+        with self.settings(DATA_UPLOAD_MAX_MEMORY_SIZE=2):\n+            with self.assertRaisesMessage(SuspiciousOperation, 'Request data too large'):\n+                request.body","path":"tests/requests/tests.py","position":15,"original_position":15,"commit_id":"02444c3f88e34100438623e51e752096b097eb9f","original_commit_id":"192e61a1e91c89daf340c3cd80132bb327abaf9b","user":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"body":"I have added a test that proves that file uploads still work no matter the request body size limit. This limit would only apply if you tried to access request.body directly and not through request.FILES, which I think makes sense.","created_at":"2015-09-14T17:31:11Z","updated_at":"2015-09-14T17:31:11Z","html_url":"https://github.com/django/django/pull/3852#discussion_r39421616","pull_request_url":"https://api.github.com/repos/django/django/pulls/3852","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/39421616"},"html":{"href":"https://github.com/django/django/pull/3852#discussion_r39421616"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/3852"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/3852","id":26977878,"html_url":"https://github.com/django/django/pull/3852","diff_url":"https://github.com/django/django/pull/3852.diff","patch_url":"https://github.com/django/django/pull/3852.patch","issue_url":"https://api.github.com/repos/django/django/issues/3852","number":3852,"state":"open","locked":false,"title":"Fixed #21231 -- Enforced a max size for form field values read into memory","user":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"body":"Enforce a maximum size for form field values read into memory.\r\nBased on a previous PR.","created_at":"2015-01-07T18:46:06Z","updated_at":"2015-09-14T17:31:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88cde7177f475c9bb51abc324a1f35bc856177f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/3852/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/3852/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/3852/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/02444c3f88e34100438623e51e752096b097eb9f","head":{"label":"edevil:21231","ref":"21231","sha":"02444c3f88e34100438623e51e752096b097eb9f","user":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"repo":{"id":7824756,"name":"django","full_name":"edevil/django","owner":{"login":"edevil","id":12426,"avatar_url":"https://avatars.githubusercontent.com/u/12426?v=3","gravatar_id":"","url":"https://api.github.com/users/edevil","html_url":"https://github.com/edevil","followers_url":"https://api.github.com/users/edevil/followers","following_url":"https://api.github.com/users/edevil/following{/other_user}","gists_url":"https://api.github.com/users/edevil/gists{/gist_id}","starred_url":"https://api.github.com/users/edevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edevil/subscriptions","organizations_url":"https://api.github.com/users/edevil/orgs","repos_url":"https://api.github.com/users/edevil/repos","events_url":"https://api.github.com/users/edevil/events{/privacy}","received_events_url":"https://api.github.com/users/edevil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edevil/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/edevil/django","forks_url":"https://api.github.com/repos/edevil/django/forks","keys_url":"https://api.github.com/repos/edevil/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edevil/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edevil/django/teams","hooks_url":"https://api.github.com/repos/edevil/django/hooks","issue_events_url":"https://api.github.com/repos/edevil/django/issues/events{/number}","events_url":"https://api.github.com/repos/edevil/django/events","assignees_url":"https://api.github.com/repos/edevil/django/assignees{/user}","branches_url":"https://api.github.com/repos/edevil/django/branches{/branch}","tags_url":"https://api.github.com/repos/edevil/django/tags","blobs_url":"https://api.github.com/repos/edevil/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edevil/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edevil/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/edevil/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edevil/django/statuses/{sha}","languages_url":"https://api.github.com/repos/edevil/django/languages","stargazers_url":"https://api.github.com/repos/edevil/django/stargazers","contributors_url":"https://api.github.com/repos/edevil/django/contributors","subscribers_url":"https://api.github.com/repos/edevil/django/subscribers","subscription_url":"https://api.github.com/repos/edevil/django/subscription","commits_url":"https://api.github.com/repos/edevil/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/edevil/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/edevil/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/edevil/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/edevil/django/contents/{+path}","compare_url":"https://api.github.com/repos/edevil/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edevil/django/merges","archive_url":"https://api.github.com/repos/edevil/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edevil/django/downloads","issues_url":"https://api.github.com/repos/edevil/django/issues{/number}","pulls_url":"https://api.github.com/repos/edevil/django/pulls{/number}","milestones_url":"https://api.github.com/repos/edevil/django/milestones{/number}","notifications_url":"https://api.github.com/repos/edevil/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edevil/django/labels{/name}","releases_url":"https://api.github.com/repos/edevil/django/releases{/id}","created_at":"2013-01-25T17:18:54Z","updated_at":"2015-01-07T16:19:48Z","pushed_at":"2015-09-14T17:26:18Z","git_url":"git://github.com/edevil/django.git","ssh_url":"git@github.com:edevil/django.git","clone_url":"https://github.com/edevil/django.git","svn_url":"https://github.com/edevil/django","homepage":"http://www.djangoproject.com/","size":121185,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"4d933ad4181a511f3ced98edba4e17aff054e0e2","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-09-14T16:53:37Z","pushed_at":"2015-09-14T17:26:23Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":312050,"stargazers_count":15930,"watchers_count":15930,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6411,"mirror_url":null,"open_issues_count":71,"forks":6411,"open_issues":71,"watchers":15930,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/3852"},"html":{"href":"https://github.com/django/django/pull/3852"},"issue":{"href":"https://api.github.com/repos/django/django/issues/3852"},"comments":{"href":"https://api.github.com/repos/django/django/issues/3852/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/3852/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/3852/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/02444c3f88e34100438623e51e752096b097eb9f"}}}}