You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2011/08/29 11:04:57 UTC
svn commit: r1162687 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: rpluem
Date: Mon Aug 29 09:04:56 2011
New Revision: 1162687
URL: http://svn.apache.org/viewvc?rev=1162687&view=rev
Log:
* We don't need a copy of the original range as we don't change it. A pointer to it is sufficient
Modified:
httpd/httpd/trunk/modules/http/byterange_filter.c
Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1162687&r1=1162686&r2=1162687&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Mon Aug 29 09:04:56 2011
@@ -441,7 +441,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
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
}
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->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;
}