From: Ruediger Pluem Date: Mon, 29 Aug 2011 09:04:56 +0000 (+0000) Subject: * We don't need a copy of the original range as we don't change it. A pointer to... X-Git-Tag: 2.3.15~317 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33dc927198f1329244e920009305eb960ead97f4;p=thirdparty%2Fapache%2Fhttpd.git * We don't need a copy of the original range as we don't change it. A pointer to it is sufficient git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162687 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 82f856b17e4..9a16376eccd 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -441,7 +441,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, static int ap_set_byterange(request_rec *r, apr_off_t clength, apr_array_header_t **indexes) { - const char *range, *or; + const char *range; const char *if_range; const char *match; const char *ct; @@ -509,13 +509,13 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength, } range += 6; - or = apr_pstrdup(r->pool, range); it = range; while (*it) { if (*it++ == ',') { ranges++; } } + it = range; if (ranges > MAX_PREALLOC_RANGES) { ranges = MAX_PREALLOC_RANGES; } @@ -628,7 +628,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength, r->range = apr_array_pstrcat(r->pool, merged, ','); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Range: %s | %s (%d : %d : %"APR_OFF_T_FMT")", - or, r->range, overlaps, reversals, clength); + it, r->range, overlaps, reversals, clength); return num_ranges; }