-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix bad error response when manifest is stripped #153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind the RemoteManifestUrl error is that we are returning the URL so that it can be fetched externally when fetch_remote_manifest is disabled. So we don't want to add extra text to the url in that case, just return the url.
Codecov Report
@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 78.27% 78.33% +0.05%
==========================================
Files 67 67
Lines 14684 14698 +14
==========================================
+ Hits 11494 11513 +19
+ Misses 3190 3185 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Well, this case is different. The reason this failure is that it is a remote url but the feature is disabled. What to you want to return here? |
There are two remote errors defined as follows:
The first should be used when we have a valid url, try to fetch it and fail. |
On RemoteManifestUrl, it is important that only the URL itself is returned so that the caller can read it and attempt to fetch the URL on their own. |
Should there be a test case for this? Also, when testing on my side, I saw it try to fetch a local JUMBF url as if it was a remote URL - is this expected? |
You must have an old version. That was changed in a prior PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. I'm not crazy about adding yet another jpeg just to test this case, But it is a good idea to have a test case for it. Perhaps when I get around to generating the images for unit tests, I'll add one to generate this case.
Changes in this pull request
Fix bad error code when manifest is stripped and XMP reference is present
Checklist
TO DO
items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.