Extend houdini to accept a new header X-Islandora-Input-Args which ca… #172
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.
Related PRs:
What does this Pull Request do?
I wanted to use the "density" parameter in imagemagick, but this parameter only works if applied BEFORE the input stream. According to the man page (https://manpages.ubuntu.com/manpages/trusty/man1/convert.im6.1.html) there are several options which are only valid as so-called "input options".
This PR extends houdini to accept these input parameters via a new header,
X-Islandora-Input-Args
. I also increased debug logging to include all headers passed to houdini, and fixed a small existing bug in the log output ($args was intended to be $content_types).What's new?
Houdini now accepts and uses this new header if present. The header is not required; houdini still functions as before if it is not present.
How should this be tested?
A description of what steps someone could take to:
With isle-dc, I find it fairly easy to test by spinning up houdini (running an existing image), and adding a volume mapping to map the new houdini code into the container like so:
Then test using CURL by executing this command (needs to be updated for your current Bearer value and a valid resource URL). Execute it from within the drupal container:
Confirm by checking the houdini logs to see that the input-args were included in the convert command line.
Additional Notes:
I have made corresponding changes in Islandora (to add this field to Generate Derivative actions), and to Alpaca (to pass the parameter through as the new header) - these PRs are linked above.
Any additional information that you think would be helpful when reviewing this PR.
Interested parties
I haven't discussed this with anyone yet - not sure if anyone else needs this or not, but it seems like a good general improvement. @Islandora/8-x-committers