[mailstream] Remove URL parameters when extracting image filenames #894
No reviewers
Labels
No labels
2018.09
2019.01
2019.03
2019.06
2019.09
2019.12
2020.03
2020.06
2020.09
2020.12
2021.03
2021.07
2021.09
2022.02
2022.06
2022.09
2022.12
2023.04
2023.05
2023.09
2024.03
2024.06
2024.09
2024.12
dependencies
Hackathon 2021
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: friendica/friendica-addons#894
Loading…
Reference in a new issue
No description provided.
Delete branch "mat/mailstream-url-params"
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?
The filenames used in mailstream sometimes end up looking like "file.jpg?param=123" because I was calling basename on a URL. This version uses parse_url to get rid of the URL paramters.
What if the query string is necessary to display the right image?
The filename used here is just a label, as far as I know only used when saving the file at the other end. It doesn't include the rest of the URL so it's useless for requesting the original image anyway. When mailstream actually does fetch the image, it uses the full URL including query params.