- Status changed to Needs review
almost 2 years ago 2:43pm 17 January 2023 - Status changed to Fixed
almost 2 years ago 3:52pm 17 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
When retrieving an upstream files, it's possible for multiple requests to require the same image or file concurrently. As is, a warning will be triggered and a `Location` header sent to try again.
Unfortunately, this is confusing when debugging other issues, because it looks like something is wrong with the download code or the underlying file system. As well, it's possible for the upstream system to start denying requests (or even all of them!) if it thinks it's being attacked.
Since Stage File Proxy is nearly always used on locals and development environments, holding a PHP process open with a lock for an additional second has few downsides and avoids triggering file races at all.
Fetch an image that needs to be downloaded from the origin with multiple processes concurrently.
Unfortunately \Drupal\stage_file_proxy\FetchManagerInterface
declares a constructor in it's interface, which makes it hard to inject additional services. As such, we'll need to:
\Drupal\stage_file_proxy\FetchManagerInterface
and create a new interface, along with an underlying class. FetchManager can decorate the new class.\Drupal\stage_file_proxy\EventSubscriber\ProxySubscriber
so we can change it's protected $manager property.Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.