Bug 31535: Fix warning - uninitialized value $mode in string ne (addbiblio.pl)
[srvgit] / errors / 401.pl
index 5cc3ac4..f5761fc 100755 (executable)
@@ -37,7 +37,7 @@ $template->param (
     errno => 401,
 );
 my $status = '401 Unauthorized';
-if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
+if ( C4::Context->is_internal_PSGI_request() ) {
     $status = '200 OK';
 }
 output_with_http_headers $query, $cookie, $template->output, 'html', $status;