{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/31315355","id":31315355,"diff_hunk":"@@ -239,28 +255,23 @@ def _load_post_and_files(self):\n             self._mark_post_parse_error()\n             return\n \n-        if self.META.get('CONTENT_TYPE', '').startswith('multipart/form-data'):\n-            if hasattr(self, '_body'):\n-                # Use already read data\n-                data = BytesIO(self._body)\n+        try:\n+            if self.META.get('CONTENT_TYPE', '').startswith('multipart/form-data'):\n+                self._post, self._files = self.parse_file_upload()\n+            elif self.META.get('CONTENT_TYPE', '').startswith('application/x-www-form-urlencoded'):\n+                self._post, self._files = QueryDict(self.body, encoding=self._encoding), MultiValueDict()\n             else:\n-                data = self\n-            try:\n-                self._post, self._files = self.parse_file_upload(self.META, data)\n-            except MultiPartParserError:\n-                # An error occurred while parsing POST data. Since when\n-                # formatting the error the request handler might access\n-                # self.POST, set self._post and self._file to prevent\n-                # attempts to parse POST data again.\n-                # Mark that an error occurred. This allows self.__repr__ to\n-                # be explicit about it instead of simply representing an\n-                # empty POST\n-                self._mark_post_parse_error()\n-                raise\n-        elif self.META.get('CONTENT_TYPE', '').startswith('application/x-www-form-urlencoded'):\n-            self._post, self._files = QueryDict(self.body, encoding=self._encoding), MultiValueDict()\n-        else:\n-            self._post, self._files = QueryDict('', encoding=self._encoding), MultiValueDict()\n+                self._post, self._files = QueryDict(encoding=self._encoding), MultiValueDict()\n+        except:","path":"django/http/request.py","position":83,"original_position":83,"commit_id":"be48f51283443d4335cf1f076cd8cf66b33e8026","original_commit_id":"be48f51283443d4335cf1f076cd8cf66b33e8026","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":"Corrected in PR #3852.","created_at":"2015-05-29T11:00:40Z","updated_at":"2015-05-29T11:00:40Z","html_url":"https://github.com/django/django/pull/3020#discussion_r31315355","pull_request_url":"https://api.github.com/repos/django/django/pulls/3020","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/31315355"},"html":{"href":"https://github.com/django/django/pull/3020#discussion_r31315355"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/3020"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/3020","id":19293096,"html_url":"https://github.com/django/django/pull/3020","diff_url":"https://github.com/django/django/pull/3020.diff","patch_url":"https://github.com/django/django/pull/3020.patch","issue_url":"https://api.github.com/repos/django/django/issues/3020","number":3020,"state":"closed","locked":false,"title":"Fixed #21231 -- Added mechanism to limit request data upload size.","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"Added settings.DATA_UPLOAD_MAX_MEMORY_SIZE, similar to the existing\r\nFILE_UPLOAD_MAX_MEMORY_SIZE, and raised SuspiciousOperation on\r\nrequests that exceed it.","created_at":"2014-08-04T16:43:00Z","updated_at":"2015-05-29T11:00:40Z","closed_at":"2014-08-28T23:39:52Z","merged_at":null,"merge_commit_sha":"21fe264aa1aceea011157c447d0d661035ca1b71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/3020/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/3020/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/3020/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/be48f51283443d4335cf1f076cd8cf66b33e8026","head":{"label":"timgraham:21231","ref":"21231","sha":"be48f51283443d4335cf1f076cd8cf66b33e8026","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"repo":{"id":6815085,"name":"django","full_name":"timgraham/django","owner":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timgraham/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/timgraham/django","forks_url":"https://api.github.com/repos/timgraham/django/forks","keys_url":"https://api.github.com/repos/timgraham/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timgraham/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timgraham/django/teams","hooks_url":"https://api.github.com/repos/timgraham/django/hooks","issue_events_url":"https://api.github.com/repos/timgraham/django/issues/events{/number}","events_url":"https://api.github.com/repos/timgraham/django/events","assignees_url":"https://api.github.com/repos/timgraham/django/assignees{/user}","branches_url":"https://api.github.com/repos/timgraham/django/branches{/branch}","tags_url":"https://api.github.com/repos/timgraham/django/tags","blobs_url":"https://api.github.com/repos/timgraham/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timgraham/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timgraham/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/timgraham/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timgraham/django/statuses/{sha}","languages_url":"https://api.github.com/repos/timgraham/django/languages","stargazers_url":"https://api.github.com/repos/timgraham/django/stargazers","contributors_url":"https://api.github.com/repos/timgraham/django/contributors","subscribers_url":"https://api.github.com/repos/timgraham/django/subscribers","subscription_url":"https://api.github.com/repos/timgraham/django/subscription","commits_url":"https://api.github.com/repos/timgraham/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/timgraham/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/timgraham/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/timgraham/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/timgraham/django/contents/{+path}","compare_url":"https://api.github.com/repos/timgraham/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timgraham/django/merges","archive_url":"https://api.github.com/repos/timgraham/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timgraham/django/downloads","issues_url":"https://api.github.com/repos/timgraham/django/issues{/number}","pulls_url":"https://api.github.com/repos/timgraham/django/pulls{/number}","milestones_url":"https://api.github.com/repos/timgraham/django/milestones{/number}","notifications_url":"https://api.github.com/repos/timgraham/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timgraham/django/labels{/name}","releases_url":"https://api.github.com/repos/timgraham/django/releases{/id}","created_at":"2012-11-22T15:27:43Z","updated_at":"2015-05-01T14:47:45Z","pushed_at":"2015-05-28T23:16:22Z","git_url":"git://github.com/timgraham/django.git","ssh_url":"git@github.com:timgraham/django.git","clone_url":"https://github.com/timgraham/django.git","svn_url":"https://github.com/timgraham/django","homepage":"http://www.djangoproject.com/","size":118486,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"6d256ae248cfa1f111d03d29402a669a95cdff3c","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-05-29T08:21:43Z","pushed_at":"2015-05-29T09:29:18Z","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":302058,"stargazers_count":14411,"watchers_count":14411,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5730,"mirror_url":null,"open_issues_count":66,"forks":5730,"open_issues":66,"watchers":14411,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/3020"},"html":{"href":"https://github.com/django/django/pull/3020"},"issue":{"href":"https://api.github.com/repos/django/django/issues/3020"},"comments":{"href":"https://api.github.com/repos/django/django/issues/3020/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/3020/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/3020/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/be48f51283443d4335cf1f076cd8cf66b33e8026"}}}}