25. HTTP API
sub handler {
my $r = shift;
my $buf = "Hello world!n";
$r->header_out('Content-Length', length($buf));
$r->send_http_header('text/html; charset=UTF-8');
}
26. HTTP API
sub handler {
my $r = shift;
my $buf = "Hello world!n";
$r->header_out('Content-Length', length($buf));
$r->send_http_header('text/html; charset=UTF-8');
$r->print($buf);
return NGX_OK;
}