{"action":"created","comment":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/103506817","pull_request_review_id":24295562,"id":103506817,"diff_hunk":"@@ -604,6 +604,26 @@ If you want to disable it set to 0.\n \n     This feature needs Twisted >= 11.1.\n \n+.. setting:: DOWNLOAD_ALLOW_DATALOSS\n+\n+DOWNLOAD_ALLOW_DATALOSS\n+-----------------------\n+\n+Default: ``False``\n+\n+Whether or not to allow broken responses, where declared ``Content-Length``\n+does not match content sent by the server. If ``False``, these responses\n+trigger a ``ResponseFailed`` error. If ``True``, these responses are allowed\n+and the flag ``partial`` is added.","path":"docs/topics/settings.rst","position":14,"original_position":14,"commit_id":"9f95357725dc9d727cd8fb7ab7699dc87f6cefa3","original_commit_id":"a35e65e6f20ee2afa5b05805fe578d5860cf790b","user":{"login":"rolando","id":26015,"avatar_url":"https://avatars1.githubusercontent.com/u/26015?v=3","gravatar_id":"","url":"https://api.github.com/users/rolando","html_url":"https://github.com/rolando","followers_url":"https://api.github.com/users/rolando/followers","following_url":"https://api.github.com/users/rolando/following{/other_user}","gists_url":"https://api.github.com/users/rolando/gists{/gist_id}","starred_url":"https://api.github.com/users/rolando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolando/subscriptions","organizations_url":"https://api.github.com/users/rolando/orgs","repos_url":"https://api.github.com/users/rolando/repos","events_url":"https://api.github.com/users/rolando/events{/privacy}","received_events_url":"https://api.github.com/users/rolando/received_events","type":"User","site_admin":false},"body":"The flag is not exclusive to this condition though. Legit ``PotentialDataLoss`` responses which were not dropped have the ``partial`` flag. I was wondering if this condition ``_DataLoss`` should have its own flag, like ``data-loss``.","created_at":"2017-02-28T17:17:22Z","updated_at":"2017-02-28T17:17:22Z","html_url":"https://github.com/scrapy/scrapy/pull/2590#discussion_r103506817","pull_request_url":"https://api.github.com/repos/scrapy/scrapy/pulls/2590","_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/103506817"},"html":{"href":"https://github.com/scrapy/scrapy/pull/2590#discussion_r103506817"},"pull_request":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/2590"}}},"pull_request":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/2590","id":107682454,"html_url":"https://github.com/scrapy/scrapy/pull/2590","diff_url":"https://github.com/scrapy/scrapy/pull/2590.diff","patch_url":"https://github.com/scrapy/scrapy/pull/2590.patch","issue_url":"https://api.github.com/repos/scrapy/scrapy/issues/2590","number":2590,"state":"open","locked":false,"title":"[MRG+1] Handle data loss gracefully.","user":{"login":"rolando","id":26015,"avatar_url":"https://avatars1.githubusercontent.com/u/26015?v=3","gravatar_id":"","url":"https://api.github.com/users/rolando","html_url":"https://github.com/rolando","followers_url":"https://api.github.com/users/rolando/followers","following_url":"https://api.github.com/users/rolando/following{/other_user}","gists_url":"https://api.github.com/users/rolando/gists{/gist_id}","starred_url":"https://api.github.com/users/rolando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolando/subscriptions","organizations_url":"https://api.github.com/users/rolando/orgs","repos_url":"https://api.github.com/users/rolando/repos","events_url":"https://api.github.com/users/rolando/events{/privacy}","received_events_url":"https://api.github.com/users/rolando/received_events","type":"User","site_admin":false},"body":"Websites that return a wrong ``Content-Length`` header may cause a data\r\nloss error resulting in Scrapy not being able to crawl given website.\r\n\r\nThis PR adds  an optional setting ``DOWNLOAD_ALLOW_DATALOSS`` and request meta ``download_allow_dataloss`` to handle dataloss gracefully and avoid dropping the response.","created_at":"2017-02-23T18:19:51Z","updated_at":"2017-02-28T17:17:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ef63074555d77386f1d6c3fc585b7fa1d309fd7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scrapy/scrapy/pulls/2590/commits","review_comments_url":"https://api.github.com/repos/scrapy/scrapy/pulls/2590/comments","review_comment_url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scrapy/scrapy/issues/2590/comments","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/9f95357725dc9d727cd8fb7ab7699dc87f6cefa3","head":{"label":"rolando-contrib:handle-data-loss-gracefully","ref":"handle-data-loss-gracefully","sha":"9f95357725dc9d727cd8fb7ab7699dc87f6cefa3","user":{"login":"rolando-contrib","id":20147263,"avatar_url":"https://avatars3.githubusercontent.com/u/20147263?v=3","gravatar_id":"","url":"https://api.github.com/users/rolando-contrib","html_url":"https://github.com/rolando-contrib","followers_url":"https://api.github.com/users/rolando-contrib/followers","following_url":"https://api.github.com/users/rolando-contrib/following{/other_user}","gists_url":"https://api.github.com/users/rolando-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/rolando-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolando-contrib/subscriptions","organizations_url":"https://api.github.com/users/rolando-contrib/orgs","repos_url":"https://api.github.com/users/rolando-contrib/repos","events_url":"https://api.github.com/users/rolando-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/rolando-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":530337,"name":"scrapy","full_name":"rolando-contrib/scrapy","owner":{"login":"rolando-contrib","id":20147263,"avatar_url":"https://avatars3.githubusercontent.com/u/20147263?v=3","gravatar_id":"","url":"https://api.github.com/users/rolando-contrib","html_url":"https://github.com/rolando-contrib","followers_url":"https://api.github.com/users/rolando-contrib/followers","following_url":"https://api.github.com/users/rolando-contrib/following{/other_user}","gists_url":"https://api.github.com/users/rolando-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/rolando-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolando-contrib/subscriptions","organizations_url":"https://api.github.com/users/rolando-contrib/orgs","repos_url":"https://api.github.com/users/rolando-contrib/repos","events_url":"https://api.github.com/users/rolando-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/rolando-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rolando-contrib/scrapy","description":"Scrapy, a fast high-level screen scraping and web crawling framework for Python.","fork":true,"url":"https://api.github.com/repos/rolando-contrib/scrapy","forks_url":"https://api.github.com/repos/rolando-contrib/scrapy/forks","keys_url":"https://api.github.com/repos/rolando-contrib/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rolando-contrib/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rolando-contrib/scrapy/teams","hooks_url":"https://api.github.com/repos/rolando-contrib/scrapy/hooks","issue_events_url":"https://api.github.com/repos/rolando-contrib/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/rolando-contrib/scrapy/events","assignees_url":"https://api.github.com/repos/rolando-contrib/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/rolando-contrib/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/rolando-contrib/scrapy/tags","blobs_url":"https://api.github.com/repos/rolando-contrib/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rolando-contrib/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rolando-contrib/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rolando-contrib/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rolando-contrib/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/rolando-contrib/scrapy/languages","stargazers_url":"https://api.github.com/repos/rolando-contrib/scrapy/stargazers","contributors_url":"https://api.github.com/repos/rolando-contrib/scrapy/contributors","subscribers_url":"https://api.github.com/repos/rolando-contrib/scrapy/subscribers","subscription_url":"https://api.github.com/repos/rolando-contrib/scrapy/subscription","commits_url":"https://api.github.com/repos/rolando-contrib/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rolando-contrib/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rolando-contrib/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rolando-contrib/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rolando-contrib/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/rolando-contrib/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rolando-contrib/scrapy/merges","archive_url":"https://api.github.com/repos/rolando-contrib/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rolando-contrib/scrapy/downloads","issues_url":"https://api.github.com/repos/rolando-contrib/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/rolando-contrib/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/rolando-contrib/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/rolando-contrib/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rolando-contrib/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/rolando-contrib/scrapy/releases{/id}","deployments_url":"https://api.github.com/repos/rolando-contrib/scrapy/deployments","created_at":"2010-02-22T15:41:56Z","updated_at":"2016-11-08T23:55:05Z","pushed_at":"2017-02-28T17:14:57Z","git_url":"git://github.com/rolando-contrib/scrapy.git","ssh_url":"git@github.com:rolando-contrib/scrapy.git","clone_url":"https://github.com/rolando-contrib/scrapy.git","svn_url":"https://github.com/rolando-contrib/scrapy","homepage":"http://scrapy.org","size":14856,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":6,"default_branch":"master"}},"base":{"label":"scrapy:master","ref":"master","sha":"0e5ed21397a1864a2272b2d2c388885003f7bb0e","user":{"login":"scrapy","id":733635,"avatar_url":"https://avatars3.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"repo":{"id":529502,"name":"scrapy","full_name":"scrapy/scrapy","owner":{"login":"scrapy","id":733635,"avatar_url":"https://avatars3.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrapy/scrapy","description":"Scrapy, a fast high-level web crawling & scraping framework for Python.","fork":false,"url":"https://api.github.com/repos/scrapy/scrapy","forks_url":"https://api.github.com/repos/scrapy/scrapy/forks","keys_url":"https://api.github.com/repos/scrapy/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrapy/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrapy/scrapy/teams","hooks_url":"https://api.github.com/repos/scrapy/scrapy/hooks","issue_events_url":"https://api.github.com/repos/scrapy/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/scrapy/scrapy/events","assignees_url":"https://api.github.com/repos/scrapy/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/scrapy/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/scrapy/scrapy/tags","blobs_url":"https://api.github.com/repos/scrapy/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrapy/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrapy/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrapy/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/scrapy/scrapy/languages","stargazers_url":"https://api.github.com/repos/scrapy/scrapy/stargazers","contributors_url":"https://api.github.com/repos/scrapy/scrapy/contributors","subscribers_url":"https://api.github.com/repos/scrapy/scrapy/subscribers","subscription_url":"https://api.github.com/repos/scrapy/scrapy/subscription","commits_url":"https://api.github.com/repos/scrapy/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrapy/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrapy/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrapy/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrapy/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/scrapy/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrapy/scrapy/merges","archive_url":"https://api.github.com/repos/scrapy/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrapy/scrapy/downloads","issues_url":"https://api.github.com/repos/scrapy/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/scrapy/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/scrapy/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/scrapy/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrapy/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/scrapy/scrapy/releases{/id}","deployments_url":"https://api.github.com/repos/scrapy/scrapy/deployments","created_at":"2010-02-22T02:01:14Z","updated_at":"2017-02-28T17:12:40Z","pushed_at":"2017-02-28T17:15:04Z","git_url":"git://github.com/scrapy/scrapy.git","ssh_url":"git@github.com:scrapy/scrapy.git","clone_url":"https://github.com/scrapy/scrapy.git","svn_url":"https://github.com/scrapy/scrapy","homepage":"http://scrapy.org","size":15260,"stargazers_count":18693,"watchers_count":18693,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":5071,"mirror_url":null,"open_issues_count":479,"forks":5071,"open_issues":479,"watchers":18693,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/2590"},"html":{"href":"https://github.com/scrapy/scrapy/pull/2590"},"issue":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/2590"},"comments":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/2590/comments"},"review_comments":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/2590/comments"},"review_comment":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/2590/commits"},"statuses":{"href":"https://api.github.com/repos/scrapy/scrapy/statuses/9f95357725dc9d727cd8fb7ab7699dc87f6cefa3"}}}}
{"actor":{"display_login":"rolando"}}