From: Gilles Dubuc Date: Tue, 28 Jul 2015 15:21:17 +0000 (+0200) Subject: Don't retry invalid thumbnail requests due to impossible width X-Git-Tag: 1.31.0-rc.0~10606^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=eadc6b05d683af1eeaef6bdcf018b77ab521b9ab;p=lhc%2Fweb%2Fwiklou.git Don't retry invalid thumbnail requests due to impossible width At the moment this isn't going to work in production, because varnish turns 400s into 500s. But I'll try to fix that separately. Bug: T106740 Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11 --- diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index d1d9999ad8..f558c4887b 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -55,11 +55,10 @@ class ThumbnailRenderJob extends Job { wfDebug( __METHOD__ . ": received status {$status}\n" ); - if ( $status === 200 || $status === 301 || $status === 302 ) { + // 400 happens when requesting a size greater or equal than the original + if ( $status === 200 || $status === 301 || $status === 302 || $status === 400 ) { return true; } elseif ( $status ) { - // Note that this currently happens (500) when requesting sizes larger then or - // equal to the original, which is harmless. $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else {