Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch requests.TooManyRedirects #4623

Merged
merged 3 commits into from
Sep 8, 2020

Conversation

bcc
Copy link
Contributor

@bcc bcc commented Sep 8, 2020

Simple fix to catch requests.TooManyRedirects exception and put a ‘broken image’ placeholder in the pdf, much like already happens when a downloaded image isn’t a valid image.

The current handling results in an exception email that doesn't identify the failing URL, nor does the feedback to the user help them identify the problematic content. We see this every few weeks on a moderately popular Indico installation.

@ThiefMaster
Copy link
Member

Thanks, looks reasonable. I guess we never expected people to link to images that redirect forever ;)

Copy link
Member

@ThiefMaster ThiefMaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to add a changelog entry ("Handle latex images with broken redirects" or something like that) with credits for yourself (same way as for other entries in CHANGES.rst from external contributors) feel free to add that! Otherwise I'll merge it later/tomorrow once CI finished.

CHANGES.rst Outdated Show resolved Hide resolved
@ThiefMaster ThiefMaster merged commit dab922f into indico:master Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants