[Koha-devel] RFC: add optional HTTP status argument to output_html_with_http_headers

Galen Charlton galen.charlton at liblime.com
Mon May 19 20:57:59 CEST 2008


Hi,

The bibliographic details scripts can redirect to errors/404.pl if the
requested bib is not found.  However, when called like this (as
opposed to via ErrorDocument), 404.pl actually returns HTTP status
200.

Since users may want to permalink to bibs via
/cgi-bin/koha/opac-detail.pl?biblionumber=FOO, having 404.pl actually
return a 404 status code would help link checkers.

Consequently, I propose to modify
C4::Output::output_html_with_http_headers to accept an optional fourth
parameter, the HTTP status code and text.  For example:

output_html_with_http_headers $query, $cookie, $template->output, "404";

or

output_html_with_http_headers $query, $cookie, $template->output, "404
Bibliographic record not found";

Any thoughts or objections to this?

Regards,

Galen
-- 
Galen Charlton
Koha Application Developer
LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709



More information about the Koha-devel mailing list