]> granicus.if.org Git - apache/commitdiff
* We don't need a copy of the original range as we don't change it. A pointer to...
authorRuediger Pluem <rpluem@apache.org>
Mon, 29 Aug 2011 09:04:56 +0000 (09:04 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 29 Aug 2011 09:04:56 +0000 (09:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162687 13f79535-47bb-0310-9956-ffa450edef68

modules/http/byterange_filter.c

index 82f856b17e48cbf3231d74f12b9e0f01b86d2700..9a16376eccd7b32bc90dcdecf188bcce4d3c52fb 100644 (file)
@@ -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;
 }