X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FOutput.pm;h=788d89d4fd7fc8dab5e5f68a6f90956f0752fcc5;hb=0e3b004add2dee74802702f467e3240d81ce0c7a;hp=1e00d4f8f47a0ebf36a03c4318a141a2f1c8692c;hpb=423b2dad7800367b4a603c566ea3aa08ccf80be7;p=koha.git diff --git a/C4/Output.pm b/C4/Output.pm index 1e00d4f8f4..788d89d4fd 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -358,7 +358,7 @@ sub pagination_bar { =item output_html_with_http_headers - &output_html_with_http_headers($query, $cookie, $html[, $content_type]) + &output_html_with_http_headers($query, $cookie, $html[, $content_type][, status]) Outputs the HTML page $html with the appropriate HTTP headers, with the authentication cookie $cookie and a Content-Type that @@ -369,7 +369,7 @@ response's Content-Type to that value instead of "text/html". =cut -sub output_html_with_http_headers ($$$;$) { +sub output_html_with_http_headers ($$$;$$) { my $query = shift; my $cookie = shift; my $html = shift; @@ -383,8 +383,10 @@ sub output_html_with_http_headers ($$$;$) { //gx; my $content_type = @_ ? shift : "text/html"; + my $status = shift; $content_type = "text/html" unless $content_type =~ m!/!; # very basic sanity check print $query->header( + -status => $status, -type => $content_type, -charset => 'UTF-8', -cookie => $cookie,