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
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 {