From 7400ceb1ed972e66e5d625a91259f2d24c54138f Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Fri, 22 Feb 2013 19:12:59 -0200 Subject: [PATCH] added 502 to RETRY_HTTP_CODES --- docs/topics/downloader-middleware.rst | 2 +- scrapy/settings/default_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst index a33805c32..72ff1c979 100644 --- a/docs/topics/downloader-middleware.rst +++ b/docs/topics/downloader-middleware.rst @@ -724,7 +724,7 @@ Maximum number of times to retry, in addition to the first download. RETRY_HTTP_CODES ^^^^^^^^^^^^^^^^ -Default: ``[500, 503, 504, 400, 408]`` +Default: ``[500, 502, 503, 504, 400, 408]`` Which HTTP response codes to retry. Other errors (DNS lookup issues, connections lost, etc) are always retried. diff --git a/scrapy/settings/default_settings.py b/scrapy/settings/default_settings.py index 47e12174b..b03aac626 100644 --- a/scrapy/settings/default_settings.py +++ b/scrapy/settings/default_settings.py @@ -192,7 +192,7 @@ REFERER_ENABLED = True RETRY_ENABLED = True RETRY_TIMES = 2 # initial response + 2 retries = 3 requests -RETRY_HTTP_CODES = [500, 503, 504, 400, 408] +RETRY_HTTP_CODES = [500, 502, 503, 504, 400, 408] RETRY_PRIORITY_ADJUST = -1 ROBOTSTXT_OBEY = False