From afcf4a7c0e16c50481852596064c9902069e4cbb Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Tue, 28 Jul 2015 16:57:18 +0200 Subject: [PATCH] Gather more information about pre rendering 500s Bug: T106740 Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de --- includes/jobqueue/jobs/ThumbnailRenderJob.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index a58fa8b17d..d1d9999ad8 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -50,7 +50,8 @@ class ThumbnailRenderJob extends Job { return false; } } elseif ( $wgUploadThumbnailRenderMethod === 'http' ) { - $status = $this->hitThumbUrl( $file, $transformParams ); + $thumbUrl = ''; + $status = $this->hitThumbUrl( $file, $transformParams, $thumbUrl ); wfDebug( __METHOD__ . ": received status {$status}\n" ); @@ -59,7 +60,7 @@ class ThumbnailRenderJob extends Job { } 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 ); + $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else { $this->setLastError( __METHOD__ . ': HTTP request failure' ); @@ -75,7 +76,7 @@ class ThumbnailRenderJob extends Job { } } - protected function hitThumbUrl( $file, $transformParams ) { + protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) { global $wgUploadThumbnailRenderHttpCustomHost, $wgUploadThumbnailRenderHttpCustomDomain; $thumbName = $file->thumbName( $transformParams ); -- 2.20.1