| 1646 | } |
| 1647 | |
| 1648 | AP_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 | |
| 1667 | static const char *set_error_document(cmd_parms *cmd, void *conf_, |
| 1668 | const char *errno_str, const char *msg) |
no test coverage detected