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

Handle invalid images and return a 400 or 500 depending on the cause #541

Merged
merged 3 commits into from
Aug 20, 2015
Merged

Handle invalid images and return a 400 or 500 depending on the cause #541

merged 3 commits into from
Aug 20, 2015

Conversation

masom
Copy link
Contributor

@masom masom commented Aug 20, 2015

Prevent thumbor from hanging when the engine or loader throw an exception.

Handle exceptions thrown by the BaseHandler._fetch method. If the exception is thrown by Pillow ( IOError with a specific message ) the response code is set to 400 ( invalid request ).

Related to #531
Helps with #528, #537

@heynemann
Copy link
Member

Thank you VERY much @masom! You are doing an incredible job!

heynemann added a commit that referenced this pull request Aug 20, 2015
Handle invalid images and return a 400 or 500 depending on the cause
@heynemann heynemann merged commit a06bec9 into thumbor:master Aug 20, 2015
@heynemann
Copy link
Member

The downside here is that we need to check the other PR to make sure if we need to rebase before accepting.

@CosmicAnalogue465
Copy link

awesome, thanks guys

@heynemann
Copy link
Member

We'll release a new version soon.

@masom masom deleted the x-handle-invalid-images branch August 21, 2015 14:55
christianjgreen pushed a commit to fanhero/thumbor that referenced this pull request Aug 29, 2017
Handle invalid images and return a 400 or 500 depending on the cause
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.

3 participants