Skip to content

Set PLACK_ENV for cgis#194

Merged
aelkiss merged 1 commit intomainfrom
ETT-1352-imgsrv-stack-trace
Mar 16, 2026
Merged

Set PLACK_ENV for cgis#194
aelkiss merged 1 commit intomainfrom
ETT-1352-imgsrv-stack-trace

Conversation

@aelkiss
Copy link
Member

@aelkiss aelkiss commented Mar 13, 2026

Staged on dev-1. This should prevent the default Plack middleware from being loaded, which generated stack traces.

@aelkiss aelkiss requested review from carylwyatt and moseshll March 13, 2026 13:28
Copy link
Member

@carylwyatt carylwyatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried a bunch of weird query params and I never saw the error screen I've been getting on dev-3 and localhost.

If I leave out the seq parameter, I still get a download screen, for example https://dev-1.babel.hathitrust.org/cgi/imgsrv/image?id=pur1.32754063106516&attachment=1&tracker=D1&format=image%2Ftiff&size=ppi%3A300

Same when I leave out seq but add a nonsense param: https://dev-1.babel.hathitrust.org/cgi/imgsrv/image?id=pur1.32754063106516&attachment=1&tracker=D1&nothing=nope&format=image%2Ftiff&size=ppi%3A300

I'm assuming there's a default seq in the code somewhere?

That's the only thing I noticed though, and this looks good to me!

@aelkiss
Copy link
Member Author

aelkiss commented Mar 13, 2026

Yes, I think that's what we saw earlier in sprint planning in looking at this. I think it defaults to the cover. I'm not sure if anything relies on that behavior but I don't think it's harmful to keep. @moseshll Let me know if you have any concerns with this, otherwise I think we can get this deployed on Monday.

Copy link
Contributor

@moseshll moseshll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, after comparing dev-1 to dev-2. I'll try to have the bogus seq patch ready to go in the near future.

@aelkiss aelkiss merged commit aa2666e into main Mar 16, 2026
2 checks passed
@aelkiss aelkiss deleted the ETT-1352-imgsrv-stack-trace branch March 16, 2026 11:45
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