Apache/2.2.9, mod_perl/2.0.4: status_line doesn't seem to work
Posted
by Eugene
on Stack Overflow
See other posts from Stack Overflow
or by Eugene
Published on 2009-09-25T15:52:09Z
Indexed on
2010/06/13
7:32 UTC
Read the original article
Hit count: 207
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?
© Stack Overflow or respective owner