Bug 30803 - output_error should not assume a 404 status
Summary: output_error should not assume a 404 status
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 23329
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-19 06:47 UTC by Marcel de Rooy
Modified: 2022-05-19 07:05 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-05-19 06:47:03 UTC
See comments on bug 30261.

> There is a fundamental flaw in output_error:
>     output_with_http_headers $query, $cookie, $template->output, 'html',
> '404 Not Found';
> Although we pass $error, it always outputs a 404. I tried sending a 403, and
> it does not work!
> 
> The 404 from output_error is caught by Plack middleware and it will output
> the 404 error document. In this case the OPAC 404 error document!