MCPcopy Create free account
hub / github.com/apache/httpd / ap_custom_response

Function ap_custom_response

server/core.c:1648–1665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1646}
1647
1648AP_DECLARE(void) ap_custom_response(request_rec *r, int status,
1649 const char *string)
1650{
1651 core_request_config *conf = ap_get_core_module_config(r->request_config);
1652 int idx;
1653
1654 if (conf->response_code_strings == NULL) {
1655 conf->response_code_strings =
1656 apr_pcalloc(r->pool,
1657 sizeof(*conf->response_code_strings) * RESPONSE_CODES);
1658 }
1659
1660 idx = ap_index_of_response(status);
1661
1662 conf->response_code_strings[idx] =
1663 ((ap_is_url(string) || (*string == '/')) && (*string != '"')) ?
1664 apr_pstrdup(r->pool, string) : apr_pstrcat(r->pool, "\"", string, NULL);
1665}
1666
1667static const char *set_error_document(cmd_parms *cmd, void *conf_,
1668 const char *errno_str, const char *msg)

Callers 2

fcgi_check_authnFunction · 0.85
lua_ap_custom_responseFunction · 0.85

Calls 3

ap_index_of_responseFunction · 0.85
ap_is_urlFunction · 0.85

Tested by

no test coverage detected