Bugfix in errors/*.pl and opac/errors/*.pl
authorSébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>
Sun, 1 Nov 2009 00:04:19 +0000 (01:04 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 15 Feb 2010 15:43:48 +0000 (16:43 +0100)
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 <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
errors/400.pl
errors/401.pl
errors/402.pl
errors/403.pl
errors/404.pl
errors/500.pl
opac/errors/400.pl
opac/errors/401.pl
opac/errors/402.pl
opac/errors/403.pl
opac/errors/500.pl

index 431792b..b04b7fd 100755 (executable)
@@ -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';
index 9374765..3ea459a 100755 (executable)
@@ -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';
index c7f6641..4bfe7ce 100755 (executable)
@@ -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';
index b6ffe0d..4058ce9 100755 (executable)
@@ -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';
index ee0fb2a..418723f 100755 (executable)
@@ -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';
index f4341ed..6f570a2 100755 (executable)
@@ -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';
index 16c169c..a0d9413 100755 (executable)
@@ -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';
index c6573f4..216b643 100755 (executable)
@@ -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';
index 8620f88..b84ccca 100755 (executable)
@@ -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';
index d223ffb..ba21cd6 100755 (executable)
@@ -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';
index d3c5ce1..fb0350e 100755 (executable)
@@ -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';