From 6f3890a6eddbc3573badfd03ab18e1afd5640183 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 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'; -- 2.39.5