[Koha-bugs] [Bug 29420] HTTP status code incorrect when calling error pages directly under Plack/PSGI

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 1 02:34:53 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29420

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #127364|0                           |1
        is obsolete|                            |

--- Comment #16 from David Cook <dcook at prosentient.com.au> ---
Created attachment 128115
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128115&action=edit
Bug 29420: HTTP status code incorrect when calling error pages directly under
Plack/PSGI

The error pages wrote a HTTP status code of 200 for all PSGI requests, even
though it should have only done it for PSGI requests from the ErrorDocument
middleware. This patch fixes that.

0) Do not apply patch
1) Open F12 dev tools and go to Network tab
2) Go to http://localhost:8081/files/blah
3) Note that the webpage is a 404 error but HTTP status code is 200
4) Go to http://localhost:8081/cgi-bin/koha/circ/blah
5) Note that the webpage is a 404 error and HTTP status code is 404

6) Apply patch
7) Go to http://localhost:8081/files/blah
8) Note that the webpage is a 404 error and HTTP status code is 404
9) Go to http://localhost:8081/cgi-bin/koha/circ/blah
10) Note that the webpage is a 404 error and HTTP status code is 404

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list