-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/iiif 2.1 #10
Merged
Merged
Feature/iiif 2.1 #10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Makes logging consistent: if info.json response isn't cached, we log something, whether it's from reading the JP2 or from reading overrides
This makes it easier to test out capability toggling
Adds custom marshal and unmarshal operations to handle the mixed data type in the info profile. This makes the Profile itself typesafe, though the code has to be far more verbose.
Adds configurable global maximums for all of RAIS, which, if set, will report the maximums when info.json is requested for an image which exceeds one or more of the values
Refactors the response helpers so they're sending/receiving the iiif.Info structure rather than raw byte slices. We can use this to test for unsupported size requests, and in the future this would let us use overridden info.json data to restrict capabilities on a per-image basis.
This will add a tiny bit of overhead since zero was previously handled in the C libraries (openjpeg and image magick), but it ensures the final image dimensions are going to be known ahead of time, which we have to have in order to restrict output without the decode cost
Go conventions say lowercase first letter, so while I'm here I'm fixing this. Take that, past-jechols!
Effectively moves the test "maximums" structure to be useable outside of testing so our handler has a more encapsulated way of expressing this and testing against a given image
If an info.json would report a zero value for any dimension, we explicitly override that with the maximum possible value. Usually a zero means the value wasn't set, but this also works even if zero is explicitly set because it wouldn't make sense to actually serve images if you wanted a limit of zero.
Fixes test which was pulling the test JP2 that has constraints built into it when we want to test custom constraints
Unlike other features, we aren't going to try and disable requests for these even if the capabilities file is set to disallow them, as it's just not really worth the extra complexity in the code. There isn't really any significant performance loss if these features are "illegally" requested by a client
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #9