Skip to content

Commit

Permalink
handle() adds the OperationList to the RequestContext before calling …
Browse files Browse the repository at this point in the history
…OperationList.applyNonEndpointMutations() (fixes #589)
  • Loading branch information
Alex Dolski committed May 12, 2022
1 parent 3934409 commit 3f856f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 5.0.6

* IIIF information endpoints always return JSON in HTTP 4xx responses.
* Fixed a bug whereby the values of the `operations` and `page_count` keys
in the delegate context were not set.
* TurboJpegProcessor is able to generate non-JPEG derivative images, which
fixes an HTTP 415 error that would occur when trying to do that.
* Fixed a crop-offset bug that could occur when using PdfBoxProcessor to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,12 @@ public void handle(OutputStream outputStream) throws Exception {
try {
fullSize = info.getSize(operationList.getPageIndex());
requestContext.setMetadata(info.getMetadata());
operationList.applyNonEndpointMutations(info, delegateProxy);
operationList.freeze();
requestContext.setOperationList(operationList, fullSize);
requestContext.setPageCount(info.getNumPages());
// This must be done *after* the request context is fully
// populated, as some of the mutations may depend on it.
operationList.applyNonEndpointMutations(info, delegateProxy);
operationList.freeze();
} catch (IllegalArgumentException | IndexOutOfBoundsException e) {
throw new IllegalClientArgumentException(e);
}
Expand Down

0 comments on commit 3f856f4

Please sign in to comment.