httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe JAILLET <christophe.jail...@wanadoo.fr>
Subject Re: svn commit: r1451478 - /httpd/httpd/trunk/server/util_script.c
Date Fri, 01 Mar 2013 07:00:06 GMT
To quick...


Le 01/03/2013 07:33, jailletc36@apache.org a écrit :
> Author: jailletc36
> Date: Fri Mar  1 06:33:40 2013
> New Revision: 1451478
>
> URL: http://svn.apache.org/r1451478
> Log:
> Avoid some memory allocation on error path in 'http2env' if TRACE1 logging is not activated
> Avoid a function ca
...call to 'apr_filepath_name_get' which ends up to a strrchr call, if 
TRACE1 logging is not activated

> Modified:
>      httpd/httpd/trunk/server/util_script.c
>
> Modified: httpd/httpd/trunk/server/util_script.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1451478&r1=1451477&r2=1451478&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/util_script.c (original)
> +++ httpd/httpd/trunk/server/util_script.c Fri Mar  1 06:33:40 2013
> @@ -73,9 +73,10 @@ static char *http2env(request_rec *r, co
>               *cp++ = '_';
>           }
>           else {
> -            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
> -                          "Not exporting header with invalid name as envvar: %s",
> -                          ap_escape_logitem(r->pool, w));
> +            if (APLOGrtrace1(r))
> +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
> +                            "Not exporting header with invalid name as envvar: %s",
> +                            ap_escape_logitem(r->pool, w));
>               return NULL;
>           }
>       }
> @@ -594,9 +595,10 @@ AP_DECLARE(int) ap_scan_script_header_er
>                                 "Invalid status line from script '%s': %.30s",
>                                 apr_filepath_name_get(r->filename), l);
>               else
> -                ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r,
> -                              "Status line from script '%s': %.30s",
> -                              apr_filepath_name_get(r->filename), l);
> +                if (APLOGrtrace1(r))
> +                   ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r,
> +                                 "Status line from script '%s': %.30s",
> +                                 apr_filepath_name_get(r->filename), l);
>               r->status_line = apr_pstrdup(r->pool, l);
>           }
>           else if (!strcasecmp(w, "Location")) {

Mime
View raw message