X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FFileRepo.php;h=50052807321ab2ddd4ca868527c5492cd7334afa;hb=11cf01dd9a8512ad4d9bded43cf22ebd38af8818;hp=8edf81f13139edd3f053bcfd09dabe880fac784d;hpb=967bbcf52546a6e260ec76ffff5b59c464189969;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 8edf81f131..5005280732 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -776,7 +776,7 @@ class FileRepo { public function getDescriptionRenderUrl( $name, $lang = null ) { $query = 'action=render'; if ( !is_null( $lang ) ) { - $query .= '&uselang=' . $lang; + $query .= '&uselang=' . urlencode( $lang ); } if ( isset( $this->scriptDirUrl ) ) { return $this->makeUrl( @@ -1602,9 +1602,15 @@ class FileRepo { $path = $this->resolveToStoragePath( $virtualUrl ); $params = [ 'src' => $path, 'headers' => $headers, 'options' => $optHeaders ]; + // T172851: HHVM does not flush the output properly, causing OOM + ob_start( null, 1048576 ); + ob_implicit_flush( true ); + $status = $this->newGood(); $status->merge( $this->backend->streamFile( $params ) ); + ob_end_flush(); + return $status; }