errors/* controller scripts are using any { /(^psgi\.|^plack\.)/i } keys %ENV to know if we are running under psgi. This is also defined in C4::Auth (psgi_env subroutine), but it's not available as it is in BEGIN. We should put this trick in an exportable subroutine to make it accessible from pl scripts.
When I was working on Bug 26048, I thought it would be enough to check for environmental variables starting with "psgi." but I don't think they were being set, but there were "plack." environmental variables. So we'd need to make sure to update "psgi_env" in C4::Auth if we did use it
Created attachment 118292 [details] [review] Bug 27555: Use psgi_env from errors sripts
I don't understand why psgi_env and safe_exit were in the BEGIN block. Should we expect a regression from CAS or Shib auth here?
Hmm, pass I'm afraid... I think that predates the work I did on Shibboleth.. I just used it.. Hopefully Matts knows?
Hi, Actually, the psgi compatibility was written by eiro at the time, see https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3551 That being said, I don't see why they should be in the BEGIN block either.
*** This bug has been marked as a duplicate of bug 29420 ***
*** This bug has been marked as a duplicate of bug 29744 ***