* Save a few bytes in conf pool when parsing some directives. Use temp_pool
when applicable.
Submitted by: jailletc36
Reviewed by: jailletc36, ylavic, covener
Backported by: jailletc36
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1662639 13f79535-47bb-0310-9956-
ffa450edef68
2.4.x patch: trunk works (module CHANGES)
+1: ylavic, wrowe, minfrin
- * Save a few bytes in conf pool when parsing some directives. Use temp_pool
- when applicable.
- trunk patch: http://svn.apache.org/r1657692
- http://svn.apache.org/r1660800
- 2.4.x patch: trunk works
- +1: jailletc36, ylavic, covener
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
}
/* Now set flags from our args */
- for (arg = apr_strtok(apr_pstrdup(cmd->pool, proto), sep, &tok);
+ for (arg = apr_strtok(apr_pstrdup(cmd->temp_pool, proto), sep, &tok);
arg; arg = apr_strtok(NULL, sep, &tok)) {
if (!strcasecmp(arg, "change=yes")) {
return;
}
- if (*(str = ap_getword_conf(cmd->pool, &arg)) != '\0') {
+ if (*(str = ap_getword_conf(cmd->temp_pool, &arg)) != '\0') {
if (!strcasecmp(str, "max")) {
cur = limit->rlim_max;
}
return;
}
- if (arg2 && (*(str = ap_getword_conf(cmd->pool, &arg2)) != '\0')) {
+ if (arg2 && (*(str = ap_getword_conf(cmd->temp_pool, &arg2)) != '\0')) {
max = atol(str);
}
return errmsg;
case FLAG:
- w = ap_getword_conf(parms->pool, &args);
+ /*
+ * This is safe to use temp_pool here, because the 'flag' itself is not
+ * forwarded as-is
+ */
+ w = ap_getword_conf(parms->temp_pool, &args);
if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
return err;
}
- fname = ap_server_root_relative(cmd->pool, arg);
+ fname = ap_server_root_relative(cmd->temp_pool, arg);
if (!fname) {
return apr_pstrcat(cmd->pool, "Invalid CoreDumpDirectory path ",
arg, NULL);