From: Sébastien Hinderer Date: Sun, 1 Nov 2009 00:04:19 +0000 (+0100) Subject: Bugfix in errors/*.pl and opac/errors/*.pl X-Git-Tag: v3.00.06~63 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=12c60fac6aa2d80bcaf4db23715191951432bfee Bugfix in errors/*.pl and opac/errors/*.pl The scripts did not define the status printed on the first line of HTTP headers correctly: they were sending 200 OK, which was confusing for browsers. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- diff --git a/errors/400.pl b/errors/400.pl index 431792b7f7..b04b7fdf73 100755 --- a/errors/400.pl +++ b/errors/400.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '400 Bad Request'; diff --git a/errors/401.pl b/errors/401.pl index 937476581c..3ea459a0b1 100755 --- a/errors/401.pl +++ b/errors/401.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '401 Unauthorized'; diff --git a/errors/402.pl b/errors/402.pl index c7f66416cc..4bfe7cee90 100755 --- a/errors/402.pl +++ b/errors/402.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '402 Payment Required'; diff --git a/errors/403.pl b/errors/403.pl index b6ffe0dda4..4058ce9ae7 100755 --- a/errors/403.pl +++ b/errors/403.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '403 Forbidden'; diff --git a/errors/404.pl b/errors/404.pl index ee0fb2a53e..418723fead 100755 --- a/errors/404.pl +++ b/errors/404.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '404 Not Found'; diff --git a/errors/500.pl b/errors/500.pl index f4341eda22..6f570a251e 100755 --- a/errors/500.pl +++ b/errors/500.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '500 Internal Server Error'; diff --git a/opac/errors/400.pl b/opac/errors/400.pl index 16c169c06c..a0d9413b26 100755 --- a/opac/errors/400.pl +++ b/opac/errors/400.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '400 Bad Request'; diff --git a/opac/errors/401.pl b/opac/errors/401.pl index c6573f4b7f..216b643912 100755 --- a/opac/errors/401.pl +++ b/opac/errors/401.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '401 Unauthorized'; diff --git a/opac/errors/402.pl b/opac/errors/402.pl index 8620f88cb6..b84cccaed2 100755 --- a/opac/errors/402.pl +++ b/opac/errors/402.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '402 Payment Required'; diff --git a/opac/errors/403.pl b/opac/errors/403.pl index d223ffb6da..ba21cd6761 100755 --- a/opac/errors/403.pl +++ b/opac/errors/403.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '403 Forbidden'; diff --git a/opac/errors/500.pl b/opac/errors/500.pl index d3c5ce1584..fb0350e74a 100755 --- a/opac/errors/500.pl +++ b/opac/errors/500.pl @@ -34,4 +34,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); $template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; +output_with_http_headers $query, $cookie, $template->output, 'html', '500 Internal Server Error';