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

Function ap_getword_conf

server/util.c:833–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831}
832
833AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
834{
835 const char *str = *line, *strend;
836 char *res;
837 char quote;
838
839 while (apr_isspace(*str))
840 ++str;
841
842 if (!*str) {
843 *line = str;
844 return "";
845 }
846
847 if ((quote = *str) == '"' || quote == '\'') {
848 strend = str + 1;
849 while (*strend && *strend != quote) {
850 if (*strend == '\\' && strend[1] &&
851 (strend[1] == quote || strend[1] == '\\')) {
852 strend += 2;
853 }
854 else {
855 ++strend;
856 }
857 }
858 res = substring_conf(p, str + 1, strend - str - 1, quote);
859
860 if (*strend == quote)
861 ++strend;
862 }
863 else {
864 strend = str;
865 while (*strend && !apr_isspace(*strend))
866 ++strend;
867
868 res = substring_conf(p, str, strend - str, 0);
869 }
870
871 while (apr_isspace(*strend))
872 ++strend;
873 *line = strend;
874 return res;
875}
876
877AP_DECLARE(char *) ap_getword_conf2_nc(apr_pool_t *p, char **line)
878{

Callers 15

mime_post_configFunction · 0.85
add_authz_providerFunction · 0.85
env_check_authorizationFunction · 0.85
method_parse_configFunction · 0.85
groups_for_userFunction · 0.85
authaliassectionFunction · 0.85
authnz_ldap_post_configFunction · 0.85
ip_parse_configFunction · 0.85

Calls 1

substring_confFunction · 0.85

Tested by

no test coverage detected