MCPcopy Index your code
hub / github.com/apache/httpd / display_info

Function display_info

modules/generators/mod_info.c:770–970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770static int display_info(request_rec * r)
771{
772 module *modp = NULL;
773 const char *more_info;
774 const command_rec *cmd;
775 apr_array_header_t *modules = NULL;
776 int i;
777
778 if (strcmp(r->handler, "server-info")) {
779 return DECLINED;
780 }
781
782 r->allowed |= (AP_METHOD_BIT << M_GET);
783 if (r->method_number != M_GET) {
784 return DECLINED;
785 }
786
787 ap_set_content_type_ex(r, "text/html; charset=ISO-8859-1", 1);
788
789 ap_rputs(DOCTYPE_XHTML_1_0T
790 "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
791 "<head>\n"
792 " <title>Server Information</title>\n" "</head>\n", r);
793 ap_rputs("<body><h1 style=\"text-align: center\">"
794 "Apache Server Information</h1>\n", r);
795 if (!r->args || ap_cstr_casecmp(r->args, "list")) {
796 if (!r->args) {
797 ap_rputs("<dl><dt><tt>Subpages:<br />", r);
798 ap_rputs("<a href=\"?config\">Configuration Files</a>, "
799 "<a href=\"?server\">Server Settings</a>, "
800 "<a href=\"?list\">Module List</a>, "
801 "<a href=\"?hooks\">Active Hooks</a>, "
802 "<a href=\"?providers\">Available Providers</a>", r);
803 ap_rputs("</tt></dt></dl><hr />", r);
804
805 ap_rputs("<dl><dt><tt>Sections:<br />", r);
806 ap_rputs("<a href=\"#modules\">Loaded Modules</a>, "
807 "<a href=\"#server\">Server Settings</a>, "
808 "<a href=\"#startup_hooks\">Startup Hooks</a>, "
809 "<a href=\"#request_hooks\">Request Hooks</a>, "
810 "<a href=\"#other_hooks\">Other Hooks</a>, "
811 "<a href=\"#providers\">Providers</a>", r);
812 ap_rputs("</tt></dt></dl><hr />", r);
813
814 ap_rputs("<h2><a name=\"modules\">Loaded Modules</a></h2>"
815 "<dl><dt><tt>", r);
816
817 modules = get_sorted_modules(r->pool);
818 for (i = 0; i < modules->nelts; i++) {
819 modp = APR_ARRAY_IDX(modules, i, module *);
820 ap_rprintf(r, "<a href=\"#%s\">%s</a>", modp->name,
821 modp->name);
822 if (i < modules->nelts) {
823 ap_rputs(", ", r);
824 }
825 }
826 ap_rputs("</tt></dt></dl><hr />", r);
827 }

Callers

nothing calls this directly

Calls 13

ap_set_content_type_exFunction · 0.85
ap_rputsFunction · 0.85
ap_cstr_casecmpFunction · 0.85
get_sorted_modulesFunction · 0.85
ap_rprintfFunction · 0.85
show_server_settingsFunction · 0.85
show_active_hooksFunction · 0.85
show_providersFunction · 0.85
mod_info_module_cmdsFunction · 0.85
module_find_hookFunction · 0.85
find_more_infoFunction · 0.85

Tested by

no test coverage detected