plugins_tpyo_amazon-s3-php-class.txt 652 B

123456789101112131415
  1. --- orig/plugins/tpyo/amazon-s3-php-class/S3.php 2022-05-20 05:32:24.000000000 +1000
  2. +++ fixed/tpyo/amazon-s3-php-class/S3.php 2022-05-25 22:22:12.000000000 +1000
  3. @@ -2356,6 +2356,12 @@
  4. foreach ($this->amzHeaders as $header => $value)
  5. if (strlen($value) > 0) $httpHeaders[] = $header.': '.$value;
  6. + if (empty($this->headers['Content-MD5']))
  7. + $this->headers['Content-MD5'] = hash('md5', $this->data);
  8. +
  9. + if (empty($this->headers['Content-Type']))
  10. + $this->headers['Content-Type'] = 'application/xml';
  11. +
  12. foreach ($this->headers as $header => $value)
  13. if (strlen($value) > 0) $httpHeaders[] = $header.': '.$value;