]> git.koha-community.org Git - koha.git/commit
Bug 23723: using exit inside eval to stop sending output to browser doesn't work...
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 3 Oct 2019 07:34:17 +0000 (09:34 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Nov 2019 14:23:58 +0000 (15:23 +0100)
commit1008c22224591b654842b3a7ab1f35fdf12ba285
treea564a52ac5a88c7d8b35df974ec57f4d54501bbd
parent2f4d2d7e3b78a19cab4a7b8360f1c62e8deff63c
Bug 23723: using exit inside eval to stop sending output to browser doesn't work under plack

When fixing Bug 23589 Theodoros Theodoropoulos noticed that we are sending
headers and html after pdf output to browser.

Using exit inside eval block doesn't stop plack from generating
headers and html page after exit since CGI::Compile will catch
exit but doesn't stop emiting output. Example is:

eval {
warn "in eval";
exit;
};
warn "after eval";

Under CGI, this would print just "in eval", but under plack we get both lines
and thus generate additional header and html after we already sent pdf data.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 43d999cc7c7edc54e3df7482b3ab3607755e4b6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
members/discharge.pl
opac/opac-discharge.pl