Response is prepared this way:
my $r = Apache2::RequestUtil->request;
$r->status_line('500 Internal Server Error');
$r->send_cgi_header("Content-Type: text/html; charset=UTF-8\n\n");
print 'Custom error message';
Request:
GET /test_page HTTP/1.1
Host: www.xxx.xxx
Response:
HTTP/1.1 200 OK
Date: XXXXXXXXXX
Server: Apache/xxxxxxxx
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
44
Custom error message
0
Why response status is 200 and not 500?