•static int
yahoo_hostname_handler(request_rec *r) {
• char host[MAXHOSTNAMELEN] =
"unknown";
• if (r->method_number != M_GET)
• return
HTTP_NOT_IMPLEMENTED;
• r->content_type =
"text/plain";
• ap_send_http_header(r);
• if (r->header_only)
• return OK;
• (void) gethostname(host, sizeof(host) - 1);
• ap_rvputs(r, host, "\n", NULL);
• return OK;
•}