From: Gilles Dubuc Date: Tue, 28 Jul 2015 14:57:18 +0000 (+0200) Subject: Gather more information about pre rendering 500s X-Git-Tag: 1.31.0-rc.0~10606^2~1 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=afcf4a7c0e16c50481852596064c9902069e4cbb;p=lhc%2Fweb%2Fwiklou.git Gather more information about pre rendering 500s Bug: T106740 Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de --- 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 );