Skip to content
Snippets Groups Projects
Commit d245ebda authored by Anthony Borghi's avatar Anthony Borghi
Browse files

Modification du File_downloader pour calculer l'Etag dans ws_data

parent bb2a6efe
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,12 @@ class File_downloader extends Vitis { ...@@ -130,7 +130,12 @@ class File_downloader extends Vitis {
// modification de $sPath pour aller chercher le fichier dans ws_data // modification de $sPath pour aller chercher le fichier dans ws_data
$sPath = $this->aProperties["ws_data_dir"] . "/" . $this->aValues["key"]; $sPath = $this->aProperties["ws_data_dir"] . "/" . $this->aValues["key"];
// check eTag // check eTag
$sEtag = sha1(file_get_contents($sPath), false);
if ($sEtag != $this->aValues['eTag']){
$bReturnFile = false; $bReturnFile = false;
$sMessage = array("status" => 0, "sMessage" => "This file doesn't exist or the Etag doesn't match");
}
} }
if($bReturnFile){ if($bReturnFile){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment