From de94e449cdb7bb3f92534fa455feb6ddc480e17b Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Hinderer?= Date: Sun, 1 Nov 2009 01:04:19 +0100 Subject: [PATCH] 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 --- errors/400.pl | 2 +- errors/401.pl | 2 +- errors/402.pl | 2 +- errors/403.pl | 2 +- errors/404.pl | 2 +- errors/500.pl | 2 +- opac/errors/400.pl | 2 +- opac/errors/401.pl | 2 +- opac/errors/402.pl | 2 +- opac/errors/403.pl | 2 +- opac/errors/500.pl | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) 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 b48917e907..db71a7c5d0 100755 --- a/opac/errors/400.pl +++ b/opac/errors/400.pl @@ -36,4 +36,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 ec1b8c2a0f..f4aad795a5 100755 --- a/opac/errors/401.pl +++ b/opac/errors/401.pl @@ -36,4 +36,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 595928b869..672705b191 100755 --- a/opac/errors/402.pl +++ b/opac/errors/402.pl @@ -36,4 +36,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 e4de04c243..d192c47f7b 100755 --- a/opac/errors/403.pl +++ b/opac/errors/403.pl @@ -36,4 +36,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 227dd37acb..1dda3ad80e 100755 --- a/opac/errors/500.pl +++ b/opac/errors/500.pl @@ -36,4 +36,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'; -- 2.39.5