dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
859d6bf
)
Return HTTP 429 when thumbnailing is throttled due to too many errors
author
Gergő Tisza
<tgr.huwiki@gmail.com>
Wed, 26 Aug 2015 21:18:54 +0000
(14:18 -0700)
committer
Gergő Tisza
<tgr.huwiki@gmail.com>
Wed, 26 Aug 2015 21:18:54 +0000
(14:18 -0700)
Bug: T110109
Change-Id: I8af527661a041964690faae7566fb97e305e2b0f
thumb.php
patch
|
blob
|
history
diff --git
a/thumb.php
b/thumb.php
index
eea6dda
..
f5eb8c9
100644
(file)
--- a/
thumb.php
+++ b/
thumb.php
@@
-332,6
+332,9
@@
function wfStreamThumb( array $params ) {
$errorCode = 500;
if ( !$thumb ) {
$errorMsg = $errorMsg ?: $msg->rawParams( 'File::transform() returned false' )->escaped();
+ if ( $errorMsg instanceof MessageSpecifier && $errorMsg->getKey() === 'thumbnail_image-failure-limit' ) {
+ $errorCode = 429;
+ }
} elseif ( $thumb->isError() ) {
$errorMsg = $thumb->getHtmlMsg();
} elseif ( !$thumb->hasFile() ) {