Open asaunier opened 6 years ago
The file storage return 403 instead of 404 for GET request, nothing to do with HeadObject operation. I've tested locally and the HeadObject operation return 404. Note that this is tested locally, but skipped on travis.
We recently pushed release v6.1.0 to camptocamp.org prod but we have observed errors when "publishing" images: uploading and thumbnails creating work but the photo backend returns a 500 error when moving files from "incoming" to "active".
The logs say:
See https://github.com/c2corg/v6_images/blob/master/c2corg_images/views.py#L114 https://github.com/c2corg/v6_images/blob/master/c2corg_images/storage.py#L101
A hint found by @gberaudo: the file does not exist but the storage returns a 403 code instead of 404 as expected by https://github.com/c2corg/v6_images/blob/master/c2corg_images/storage.py#L116
It seems that S3 indeed returns 403 code when a file is missing. The weird thing is that it worked on the demo site whose storage is also S3 (?).