I tried to reconcile your patch with your svn log entry and I failed. Could you either correct or explain further?
TIA, Bill On Jun 2, 2015 12:40 AM, <jaillet...@apache.org> wrote: > Author: jailletc36 > Date: Tue Jun 2 05:40:57 2015 > New Revision: 1683044 > > URL: http://svn.apache.org/r1683044 > Log: > Skip a few bytes before calling 'strchr' if we know that they can't match. > s/apr_pstrndup/apr_pstrmemdup/ when applicable. > Fix a comment typo. > > Modified: > httpd/httpd/trunk/server/core.c > > Modified: httpd/httpd/trunk/server/core.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1683044&r1=1683043&r2=1683044&view=diff > > ============================================================================== > --- httpd/httpd/trunk/server/core.c (original) > +++ httpd/httpd/trunk/server/core.c Tue Jun 2 05:40:57 2015 > @@ -1263,8 +1263,8 @@ AP_DECLARE(const char *) ap_resolve_env( > } > > if (*s == '$') { > - if (s[1] == '{' && (e = ap_strchr_c(s, '}'))) { > - char *name = apr_pstrndup(p, s+2, e-s-2); > + if (s[1] == '{' && (e = ap_strchr_c(s+2, '}'))) { > + char *name = apr_pstrmemdup(p, s+2, e-s-2); > word = NULL; > if (server_config_defined_vars) > word = apr_table_get(server_config_defined_vars, > name); > @@ -2147,7 +2147,7 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_ > return unclosed_directive(cmd); > } > > - limited_methods = apr_pstrndup(cmd->temp_pool, arg, endp - arg); > + limited_methods = apr_pstrmemdup(cmd->temp_pool, arg, endp - arg); > > if (!limited_methods[0]) { > return missing_container_arg(cmd); > @@ -2164,7 +2164,7 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_ > return "TRACE cannot be controlled by <Limit>, see > TraceEnable"; > } > else if (methnum == M_INVALID) { > - /* method has not been registered yet, but resorce restriction > + /* method has not been registered yet, but resource > restriction > * is always checked before method handling, so register it. > */ > methnum = ap_method_register(cmd->pool, > > >