mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #522] Same image content returned for different image URLs when loading within short timeframe #188
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ebner on GitHub (Oct 9, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/522
Originally assigned to: @sadok-f on GitHub.
Describe the bug
When loading multiple images at the same time from the same host it happens that flyimg returns the same content for different image URLs.
To Reproduce
I created the following script (
flyimg.sh) to showcase the problem:You can pipe the script output into
sortanduniqto easily detect how often the duplicate content situation occurs:./flyimg.sh | sort | uniq -c | sort -rWhen uncommenting the sleep command in the first line of the
dl()method it can be seen that the problem does not occur that frequently. This indicates a concurrency problem in flyimg.Expected behavior
The script above should return 10 unique MD5 hashes.
Environment setup:
The problem can be reproduced with a local Docker instance of flyimg as well as demo.flyimg.io.
@sadok-f commented on GitHub (Oct 9, 2024):
Hi @ebner
Thank you for reporting this issue!
I'll look into it as soon as possible.
@sadok-f commented on GitHub (Oct 9, 2024):
Hi @ebner
I just released a fix for the issue you reported, thank you again.
One thing regarding the
?symbol: It needs to be encoded to be accepted in the image URL parameters?=>%3Fso your script should look like this:
@ebner commented on GitHub (Oct 10, 2024):
Hi @sadok-f
Perfect, thanks a lot for the quick fix! I can confirm that your fix solves the problem.