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/28 19:08:35 UTC
svn commit: r1162556 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: rpluem
Date: Sun Aug 28 17:08:35 2011
New Revision: 1162556
URL: http://svn.apache.org/viewvc?rev=1162556&view=rev
Log:
* Style police. No functional changes
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=1162556&r1=1162555&r2=1162556&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Sun Aug 28 17:08:35 2011
@@ -275,9 +275,11 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
int i;
indexes = apr_array_make(r->pool, 10, sizeof(indexes_t));
-
- /* Iterate through the brigade until reaching EOS or a bucket with
- * unknown length. */
+
+ /*
+ * Iterate through the brigade until reaching EOS or a bucket with
+ * unknown length.
+ */
for (e = APR_BRIGADE_FIRST(bb);
(e != APR_BRIGADE_SENTINEL(bb) && !APR_BUCKET_IS_EOS(e)
&& e->length != (apr_size_t)-1);
@@ -285,10 +287,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
clength += e->length;
}
- /* Don't attempt to do byte range work if this brigade doesn't
+ /*
+ * Don't attempt to do byte range work if this brigade doesn't
* contain an EOS, or if any of the buckets has an unknown length;
* this avoids the cases where it is expensive to perform
- * byteranging (i.e. may require arbitrary amounts of memory). */
+ * byteranging (i.e. may require arbitrary amounts of memory).
+ */
if (!APR_BUCKET_IS_EOS(e) || clength <= 0) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
@@ -350,7 +354,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
}
found = 1;
- /* For single range requests, we must produce Content-Range header.
+ /*
+ * For single range requests, we must produce Content-Range header.
* Otherwise, we need to produce the multipart boundaries.
*/
if (num_ranges == 1) {
@@ -482,7 +487,7 @@ static int ap_set_byterange(request_rec
char *dash;
char *errp;
apr_off_t number, start, end;
-
+
if (!(dash = strchr(cur, '-'))) {
break;
}
@@ -511,7 +516,7 @@ static int ap_set_byterange(request_rec
end = clength - 1;
}
}
-
+
if (start < 0) {
start = 0;
}
@@ -531,7 +536,7 @@ static int ap_set_byterange(request_rec
continue;
}
in_merge = 0;
-
+
if (start >= ostart && end <= oend) {
in_merge = 1;
}
@@ -580,7 +585,7 @@ static int ap_set_byterange(request_rec
"Sum of ranges not smaller than file, ignoring.");
return 0;
}
-
+
r->status = HTTP_PARTIAL_CONTENT;
r->range = apr_array_pstrcat(r->pool, merged, ',');
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,