expcov report - Generated Sat Oct 15 21:39:18 2016

 Index  Statistics  Last 
Directory./modules/http
Filenamebyterange_filter.c
ModifiedTue Feb 12 20:05:08 2013

Pass Half Fail Excluded Total
Function
0
0.00%
6
100.00%
0
0.00%
6
100%
Expressions
0
0.00%
346
100.00%
0
0.00%
346
100%
Conditions
0
0.00%
0
0.00%
83
100.00%
0
0.00%
83
100%
MC/DC
0
0.00%
39
100.00%
0
0.00%
39
100%
Branches

if
0
0.00%
0
0.00%
50
100.00%
0
0.00%
50
100%
for
0
0.00%
0
0.00%
3
100.00%
0
0.00%
3
100%
while
0
0.00%
0
0.00%
3
100.00%
0
0.00%
3
100%
case
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%

1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * byterange_filter.c --- HTTP byterange filter and friends.
19 */
20
21#include "apr.h"
22#include "apr_strings.h"
23#include "apr_buckets.h"
24#include "apr_lib.h"
25#include "apr_signal.h"
26
27#define APR_WANT_STDIO          /* for sscanf */
28#define APR_WANT_STRFUNC
29#define APR_WANT_MEMFUNC
30#include "apr_want.h"
31
32#define CORE_PRIVATE
33#include "util_filter.h"
34#include "ap_config.h"
35#include "httpd.h"
36#include "http_config.h"
37#include "http_core.h"
38#include "http_protocol.h"
39#include "http_main.h"
40#include "http_request.h"
41#include "http_vhost.h"
42#include "http_log.h"           /* For errors detected in basic auth common
43                                 * support code... */
44#include "apr_date.h"           /* For apr_date_parse_http and APR_DATE_BAD */
45#include "util_charset.h"
46#include "util_ebcdic.h"
47#include "util_time.h"
48
49#include "mod_core.h"
50
51#if APR_HAVE_STDARG_H
52#include <stdarg.h>
53#endif
54#if APR_HAVE_UNISTD_H
55#include <unistd.h>
56#endif
57
58#ifndef AP_DEFAULT_MAX_RANGES
59#define AP_DEFAULT_MAX_RANGES 200
60#endif
61
62static int ap_set_byterange(request_rec *r, apr_off_t clength,
63                            apr_array_header_t **indexes);
64
65/*
66 * Here we try to be compatible with clients that want multipart/x-byteranges
67 * instead of multipart/byteranges (also see above), as per HTTP/1.1. We
68 * look for the Request-Range header (e.g. Netscape 2 and 3) as an indication
69 * that the browser supports an older protocol. We also check User-Agent
70 * for Microsoft Internet Explorer 3, which needs this as well.
71 */
72static int use_range_x : call=0
u
se_range_x(request_rec *r)
73{
74    const char *ua;
75    return : pass=0
r
eturn (MC/DC independently affect : true=0, false=0
apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
aTF
pr_table_get(r : modules/http/byterange_filter.c line=72 column=37
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "Request-Range")
76            || : true=0, false=0
|
| ((ua : modules/http/byterange_filter.c line=74 column=17
u
= : pass=0
MC/DC independently affect : true=0, false=0
=TF
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=72 column=37
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "User-Agent"))
77                && : true=0, false=0
&
& ap_strstr_c(ua : modules/http/byterange_filter.c line=74 column=17
u
a, "MSIE 3")));
78}
79
80#define BYTERANGE_FMT "%" APR_OFF_T_FMT "-%" APR_OFF_T_FMT "/%" APR_OFF_T_FMT
81
82static apr_status_t copy_brigade_range : call=0
c
opy_brigade_range(apr_bucket_brigade *bb,
83                                       apr_bucket_brigade *bbout,
84                                       apr_off_t start,
85                                       apr_off_t end)
86{
87    apr_bucket *first = NULL, *last = NULL, *out_first = NULL, *e;
88    apr_uint64_t pos = 0, off_first = 0, off_last = 0;
89    apr_status_t rv;
90    apr_uint64_t start64, end64;
91    apr_off_t pofft = 0;
92
93    /*
94     * Once we know that start and end are >= 0 convert everything to apr_uint64_t.
95     * See the comments in apr_brigade_partition why.
96     * In short apr_off_t (for values >= 0)and apr_size_t fit into apr_uint64_t.
97     */
98    start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64 = : pass=0
=
 (apr_uint64_t)start : modules/http/byterange_filter.c line=84 column=50
s
tart;
99    end64 : modules/http/byterange_filter.c line=90 column=27
e
nd64 = : pass=0
=
 (apr_uint64_t)end : modules/http/byterange_filter.c line=85 column=50
e
nd;
100
101    if : true=0, false=0
i
f (start : modules/http/byterange_filter.c line=84 column=50
s
tart < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 0 || : true=0, false=0
|
end : modules/http/byterange_filter.c line=85 column=50
e
nd < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 0 || : true=0, false=0
|
start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64 > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 end64 : modules/http/byterange_filter.c line=90 column=27
e
nd64)
102        return : pass=0
r
eturn APR_EINVAL;
103
104    for : true=0, false=0
f
or (e : modules/http/byterange_filter.c line=87 column=65
e
 = : pass=0
=
 APR_BRIGADE_FIRST(bb : modules/http/byterange_filter.c line=82 column=60
b
b);
105         e : modules/http/byterange_filter.c line=87 column=65
e
 != : true=0, false=0
!
= APR_BRIGADE_SENTINEL(bb : modules/http/byterange_filter.c line=82 column=60
b
b);
106         e : modules/http/byterange_filter.c line=87 column=65
e
 = : pass=0
=
 APR_BUCKET_NEXT(e : modules/http/byterange_filter.c line=87 column=65
e
))
107    {
108        apr_uint64_t elen64;
109        /* we know that no bucket has undefined length (-1) */
110        AP_DEBUG_ASSERT(e->length != (apr_size_t)(-1));
111        elen64 : modules/http/byterange_filter.c line=108 column=22
e
len64 = : pass=0
=
 (apr_uint64_t)e : modules/http/byterange_filter.c line=87 column=65
e
-> : enter=0, leave=0
-
>length : /usr/include/apr-1/apr_buckets.h line=234 column=16 length;
112        if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
first : modules/http/byterange_filter.c line=87 column=17
f
irst && : true=0, false=0
&
& (elen64 : modules/http/byterange_filter.c line=108 column=22
e
len64 + : pass=0
+
 pos : modules/http/byterange_filter.c line=88 column=18
p
os > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64)) {
113            first : modules/http/byterange_filter.c line=87 column=17
f
irst = : pass=0
=
 e : modules/http/byterange_filter.c line=87 column=65
e
;
114            off_first : modules/http/byterange_filter.c line=88 column=27
o
ff_first = : pass=0
=
 pos : modules/http/byterange_filter.c line=88 column=18
p
os;
115        }
116        if : true=0, false=0
i
f (elen64 : modules/http/byterange_filter.c line=108 column=22
e
len64 + : pass=0
+
 pos : modules/http/byterange_filter.c line=88 column=18
p
os > : true=0, false=0
>
 end64 : modules/http/byterange_filter.c line=90 column=27
e
nd64) {
117            last : modules/http/byterange_filter.c line=87 column=32
l
ast = : pass=0
=
 e : modules/http/byterange_filter.c line=87 column=65
e
;
118            off_last : modules/http/byterange_filter.c line=88 column=42
o
ff_last = : pass=0
=
 pos : modules/http/byterange_filter.c line=88 column=18
p
os;
119            break : pass=0
b
reak;
120        }
121        pos : modules/http/byterange_filter.c line=88 column=18
p
os += : pass=0
+
elen64 : modules/http/byterange_filter.c line=108 column=22
e
len64;
122    }
123    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
first : modules/http/byterange_filter.c line=87 column=17
f
irst || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
last : modules/http/byterange_filter.c line=87 column=32
l
ast)
124        return : pass=0
r
eturn APR_EINVAL;
125
126    e : modules/http/byterange_filter.c line=87 column=65
e
 = : pass=0
=
 first : modules/http/byterange_filter.c line=87 column=17
f
irst;
127    while : true=0, false=0
w
hile (1)
128    {
129        apr_bucket *copy;
130        AP_DEBUG_ASSERT(e != APR_BRIGADE_SENTINEL(bb));
131        rv : modules/http/byterange_filter.c line=89 column=18
r
= : pass=0
=
 apr_bucket_copy(e : modules/http/byterange_filter.c line=87 column=65
e
, &copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
132        if : true=0, false=0
i
f (rv : modules/http/byterange_filter.c line=89 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
133            apr_brigade_cleanup : enter=0, leave=0

apr_brigade_cleanup : /usr/include/apr-1/apr_buckets.h line=679 column=27
a
pr_brigade_cleanup(bbout : modules/http/byterange_filter.c line=83 column=60
b
bout);
134            return : pass=0
r
eturn rv : modules/http/byterange_filter.c line=89 column=18
r
v;
135        }
136
137        APR_BRIGADE_INSERT_TAIL(bbout : modules/http/byterange_filter.c line=83 column=60
b
bout, copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
138        if : true=0, false=0
i
f (e : modules/http/byterange_filter.c line=87 column=65
e
 == : true=0, false=0
=
first : modules/http/byterange_filter.c line=87 column=17
f
irst) {
139            if : true=0, false=0
i
f (off_first : modules/http/byterange_filter.c line=88 column=27
o
ff_first != : true=0, false=0
!
start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64) {
140                rv : modules/http/byterange_filter.c line=89 column=18
r
= : pass=0
=
 apr_bucket_split(copy : modules/http/byterange_filter.c line=129 column=21
c
opy, (apr_size_t)(start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64 - : pass=0
-
 off_first : modules/http/byterange_filter.c line=88 column=27
o
ff_first));
141                if : true=0, false=0
i
f (rv : modules/http/byterange_filter.c line=89 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
142                    apr_brigade_cleanup : enter=0, leave=0

apr_brigade_cleanup : /usr/include/apr-1/apr_buckets.h line=679 column=27
a
pr_brigade_cleanup(bbout : modules/http/byterange_filter.c line=83 column=60
b
bout);
143                    return : pass=0
r
eturn rv : modules/http/byterange_filter.c line=89 column=18
r
v;
144                }
145                out_first : modules/http/byterange_filter.c line=87 column=46
o
ut_first = : pass=0
=
 APR_BUCKET_NEXT(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
146                APR_BUCKET_REMOVE(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
147                apr_bucket_destroy(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
148            }
149            else {
150                out_first : modules/http/byterange_filter.c line=87 column=46
o
ut_first = : pass=0
=
 copy : modules/http/byterange_filter.c line=129 column=21
c
opy;
151            }
152        }
153        if : true=0, false=0
i
f (e : modules/http/byterange_filter.c line=87 column=65
e
 == : true=0, false=0
=
last : modules/http/byterange_filter.c line=87 column=32
l
ast) {
154            if : true=0, false=0
i
f (e : modules/http/byterange_filter.c line=87 column=65
e
 == : true=0, false=0
=
first : modules/http/byterange_filter.c line=87 column=17
f
irst) {
155                off_last : modules/http/byterange_filter.c line=88 column=42
o
ff_last += : pass=0
+
start64 : modules/http/byterange_filter.c line=90 column=18
s
tart64 - : pass=0
-
 off_first : modules/http/byterange_filter.c line=88 column=27
o
ff_first;
156                copy : modules/http/byterange_filter.c line=129 column=21
c
opy = : pass=0
=
 out_first : modules/http/byterange_filter.c line=87 column=46
o
ut_first;
157            }
158            if : true=0, false=0
i
f (end64 : modules/http/byterange_filter.c line=90 column=27
e
nd64 - : pass=0
-
 off_last : modules/http/byterange_filter.c line=88 column=42
o
ff_last != : true=0, false=0
!
= (apr_uint64_t)e : modules/http/byterange_filter.c line=87 column=65
e
-> : enter=0, leave=0
-
>length : /usr/include/apr-1/apr_buckets.h line=234 column=16 length) {
159                rv : modules/http/byterange_filter.c line=89 column=18
r
= : pass=0
=
 apr_bucket_split(copy : modules/http/byterange_filter.c line=129 column=21
c
opy, (apr_size_t)(end64 : modules/http/byterange_filter.c line=90 column=27
e
nd64 + : pass=0
+
 1 - : pass=0
-
 off_last : modules/http/byterange_filter.c line=88 column=42
o
ff_last));
160                if : true=0, false=0
i
f (rv : modules/http/byterange_filter.c line=89 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
161                    apr_brigade_cleanup : enter=0, leave=0

apr_brigade_cleanup : /usr/include/apr-1/apr_buckets.h line=679 column=27
a
pr_brigade_cleanup(bbout : modules/http/byterange_filter.c line=83 column=60
b
bout);
162                    return : pass=0
r
eturn rv : modules/http/byterange_filter.c line=89 column=18
r
v;
163                }
164                copy : modules/http/byterange_filter.c line=129 column=21
c
opy = : pass=0
=
 APR_BUCKET_NEXT(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
165                if : true=0, false=0
i
f (copy : modules/http/byterange_filter.c line=129 column=21
c
opy != : true=0, false=0
!
= APR_BRIGADE_SENTINEL(bbout : modules/http/byterange_filter.c line=83 column=60
b
bout)) {
166                    APR_BUCKET_REMOVE(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
167                    apr_bucket_destroy(copy : modules/http/byterange_filter.c line=129 column=21
c
opy);
168                }
169            }
170            break : pass=0
b
reak;
171        }
172        e : modules/http/byterange_filter.c line=87 column=65
e
 = : pass=0
=
 APR_BUCKET_NEXT(e : modules/http/byterange_filter.c line=87 column=65
e
);
173    }
174
175    AP_DEBUG_ASSERT(APR_SUCCESS == apr_brigade_length(bbout, 1, &pofft));
176    pos : modules/http/byterange_filter.c line=88 column=18
p
os = : pass=0
=
 (apr_uint64_t)pofft : modules/http/byterange_filter.c line=91 column=15
p
offt;
177    AP_DEBUG_ASSERT(pos == end64 - start64 + 1);
178    return : pass=0
r
eturn APR_SUCCESS;
179}
180
181typedef struct indexes_t {
182    apr_off_t start;
183    apr_off_t end;
184} indexes_t;
185
186static int get_max_ranges : call=0
g
et_max_ranges(request_rec *r) { 
187    core_dir_config *core_conf = ap_get_module_config(r : modules/http/byterange_filter.c line=186 column=40
r
-> : enter=0, leave=0
-
>per_dir_config : include/httpd.h line=977 column=30
p
er_dir_config, 
188                                                      &core_module : include/http_core.h line=345 column=31
c
ore_module);
189    if : true=0, false=0
i
f (core_conf : modules/http/byterange_filter.c line=187 column=22
c
ore_conf-> : enter=0, leave=0
-
>max_ranges : include/http_core.h line=588 column=9
m
ax_ranges >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= 0 || : true=0, false=0
|
core_conf : modules/http/byterange_filter.c line=187 column=22
c
ore_conf-> : enter=0, leave=0
-
>max_ranges : include/http_core.h line=588 column=9
m
ax_ranges == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= AP_MAXRANGES_UNLIMITED) { 
190        return : pass=0
r
eturn core_conf : modules/http/byterange_filter.c line=187 column=22
c
ore_conf-> : enter=0, leave=0
-
>max_ranges : include/http_core.h line=588 column=9
m
ax_ranges;
191    }
192
193    /* Any other negative val means the default */
194    return : pass=0
r
eturn AP_DEFAULT_MAX_RANGES;
195}
196
197static apr_status_t send_416 : call=0
s
end_416(ap_filter_t *f, apr_bucket_brigade *tmpbb)
198{
199    apr_bucket *e;
200    conn_rec *c = f : modules/http/byterange_filter.c line=197 column=43
f
-> : enter=0, leave=0
-
>r : include/util_filter.h line=277 column=18
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection;
201    ap_remove_output_filter : enter=0, leave=0

ap_remove_output_filter : include/util_filter.h line=469 column=18
a
p_remove_output_filter(f : modules/http/byterange_filter.c line=197 column=43
f
);
202    f : modules/http/byterange_filter.c line=197 column=43
f
-> : enter=0, leave=0
-
>r : include/util_filter.h line=277 column=18
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus = : enter=0, leave=0
=
 HTTP_OK;
203    e : modules/http/byterange_filter.c line=199 column=17
e
 = : pass=0
=
 ap_bucket_error_create : enter=0, leave=0

ap_bucket_error_create : include/http_protocol.h line=668 column=26
a
p_bucket_error_create(HTTP_RANGE_NOT_SATISFIABLE, NULL,
204                               f : modules/http/byterange_filter.c line=197 column=43
f
-> : enter=0, leave=0
-
>r : include/util_filter.h line=277 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/http/byterange_filter.c line=200 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
205    APR_BRIGADE_INSERT_TAIL(tmpbb : modules/http/byterange_filter.c line=197 column=66
t
mpbb, e : modules/http/byterange_filter.c line=199 column=17
e
);
206    e : modules/http/byterange_filter.c line=199 column=17
e
 = : pass=0
=
 apr_bucket_eos_create : enter=0, leave=0

apr_bucket_eos_create : /usr/include/apr-1/apr_buckets.h line=1260 column=27
a
pr_bucket_eos_create(c : modules/http/byterange_filter.c line=200 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
207    APR_BRIGADE_INSERT_TAIL(tmpbb : modules/http/byterange_filter.c line=197 column=66
t
mpbb, e : modules/http/byterange_filter.c line=199 column=17
e
);
208    return : pass=0
r
eturn ap_pass_brigade : enter=0, leave=0

ap_pass_brigade : include/util_filter.h line=312 column=26
a
p_pass_brigade(f : modules/http/byterange_filter.c line=197 column=43
f
-> : enter=0, leave=0
-
>next : include/util_filter.h line=271 column=18
n
ext, tmpbb : modules/http/byterange_filter.c line=197 column=66
t
mpbb);
209}
210
211AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter : call=0
a
p_byterange_filter(ap_filter_t *f,
212                                                         apr_bucket_brigade *bb)
213{
214    request_rec *r = f : modules/http/byterange_filter.c line=211 column=71
f
-> : enter=0, leave=0
-
>r : include/util_filter.h line=277 column=18
r
;
215    conn_rec *c = r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection;
216    apr_bucket *e;
217    apr_bucket_brigade *bsend;
218    apr_bucket_brigade *tmpbb;
219    apr_off_t range_start;
220    apr_off_t range_end;
221    apr_off_t clength = 0;
222    apr_status_t rv;
223    int found = 0;
224    int num_ranges;
225    char *boundary = NULL;
226    char *bound_head = NULL;
227    apr_array_header_t *indexes;
228    indexes_t *idx;
229    int i;
230    int original_status;
231    int max_ranges = get_max_ranges : enter=0, leave=0

get_max_ranges : modules/http/byterange_filter.c line=186 column=12
g
et_max_ranges(r : modules/http/byterange_filter.c line=214 column=18
r
);
232
233    /*
234     * Iterate through the brigade until reaching EOS or a bucket with
235     * unknown length.
236     */
237    for : true=0, false=0
f
or (e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 APR_BRIGADE_FIRST(bb : modules/http/byterange_filter.c line=212 column=78
b
b);
238         (e : modules/http/byterange_filter.c line=216 column=17
e
 != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= APR_BRIGADE_SENTINEL(bb : modules/http/byterange_filter.c line=212 column=78
b
b) && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
APR_BUCKET_IS_EOS(e : modules/http/byterange_filter.c line=216 column=17
e
)
239          && : true=0, false=0
&
e : modules/http/byterange_filter.c line=216 column=17
e
-> : enter=0, leave=0
-
>length : /usr/include/apr-1/apr_buckets.h line=234 column=16 length != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= (apr_size_t)-1);
240         e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 APR_BUCKET_NEXT(e : modules/http/byterange_filter.c line=216 column=17
e
)) {
241        clength : modules/http/byterange_filter.c line=221 column=15
c
length += : pass=0
+
e : modules/http/byterange_filter.c line=216 column=17
e
-> : enter=0, leave=0
-
>length : /usr/include/apr-1/apr_buckets.h line=234 column=16 length;
242    }
243
244    /*
245     * Don't attempt to do byte range work if this brigade doesn't
246     * contain an EOS, or if any of the buckets has an unknown length;
247     * this avoids the cases where it is expensive to perform
248     * byteranging (i.e. may require arbitrary amounts of memory).
249     */
250    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
APR_BUCKET_IS_EOS(e : modules/http/byterange_filter.c line=216 column=17
e
|| : true=0, false=0
|
clength : modules/http/byterange_filter.c line=221 column=15
c
length <= : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
= 0) {
251        ap_remove_output_filter : enter=0, leave=0

ap_remove_output_filter : include/util_filter.h line=469 column=18
a
p_remove_output_filter(f : modules/http/byterange_filter.c line=211 column=71
f
);
252        return : pass=0
r
eturn ap_pass_brigade : enter=0, leave=0

ap_pass_brigade : include/util_filter.h line=312 column=26
a
p_pass_brigade(f : modules/http/byterange_filter.c line=211 column=71
f
-> : enter=0, leave=0
-
>next : include/util_filter.h line=271 column=18
n
ext, bb : modules/http/byterange_filter.c line=212 column=78
b
b);
253    }
254
255    original_status : modules/http/byterange_filter.c line=230 column=9
o
riginal_status = : pass=0
=
 r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus;
256    num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges = : pass=0
=
 ap_set_byterange : enter=0, leave=0

ap_set_byterange : modules/http/byterange_filter.c line=62 column=12
a
p_set_byterange(r : modules/http/byterange_filter.c line=214 column=18
r
clength : modules/http/byterange_filter.c line=221 column=15
c
length, &indexes : modules/http/byterange_filter.c line=227 column=25
i
ndexes);
257
258    /* We have nothing to do, get out of the way. */
259    if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0 || : true=0, false=0
|
| (max_ranges : modules/http/byterange_filter.c line=231 column=9
m
ax_ranges >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= 0 && : true=0, false=0
&
num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 max_ranges : modules/http/byterange_filter.c line=231 column=9
m
ax_ranges)) {
260        r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus = : enter=0, leave=0
=
 original_status : modules/http/byterange_filter.c line=230 column=9
o
riginal_status;
261        ap_remove_output_filter : enter=0, leave=0

ap_remove_output_filter : include/util_filter.h line=469 column=18
a
p_remove_output_filter(f : modules/http/byterange_filter.c line=211 column=71
f
);
262        return : pass=0
r
eturn ap_pass_brigade : enter=0, leave=0

ap_pass_brigade : include/util_filter.h line=312 column=26
a
p_pass_brigade(f : modules/http/byterange_filter.c line=211 column=71
f
-> : enter=0, leave=0
-
>next : include/util_filter.h line=271 column=18
n
ext, bb : modules/http/byterange_filter.c line=212 column=78
b
b);
263    }
264
265    /* this brigade holds what we will be sending */
266    bsend : modules/http/byterange_filter.c line=217 column=25
b
send = : pass=0
=
 apr_brigade_create : enter=0, leave=0

apr_brigade_create : /usr/include/apr-1/apr_buckets.h line=658 column=35
a
pr_brigade_create(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
267
268    if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges < : true=0, false=0
<
 0)
269        return : pass=0
r
eturn send_416 : enter=0, leave=0

send_416 : modules/http/byterange_filter.c line=197 column=21
s
end_416(f : modules/http/byterange_filter.c line=211 column=71
f
bsend : modules/http/byterange_filter.c line=217 column=25
b
send);
270
271    if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges > : true=0, false=0
>
 1) {
272        /* Is ap_make_content_type required here? */
273        const char *orig_ct = ap_make_content_type : enter=0, leave=0

ap_make_content_type : include/http_protocol.h line=140 column=26
a
p_make_content_type(r : modules/http/byterange_filter.c line=214 column=18
r
r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>content_type : include/httpd.h line=917 column=17
c
ontent_type);
274        boundary : modules/http/byterange_filter.c line=225 column=11
b
oundary = : pass=0
=
 apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, "%" APR_UINT64_T_HEX_FMT "%lx",
275                                (apr_uint64_t)r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>request_time : include/httpd.h line=817 column=16
r
equest_time, c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>id : include/httpd.h line=1089 column=10
i
d);
276
277        ap_set_content_type : enter=0, leave=0

ap_set_content_type : include/http_protocol.h line=310 column=18
a
p_set_content_type(r : modules/http/byterange_filter.c line=214 column=18
r
apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, "multipart",
278                                           use_range_x : enter=0, leave=0

use_range_x : modules/http/byterange_filter.c line=72 column=12
u
se_range_x(r : modules/http/byterange_filter.c line=214 column=18
r
conditional operator : true=0, false=0
?
 "/x-" : "/",
279                                           "byteranges; boundary=",
280                                           boundary : modules/http/byterange_filter.c line=225 column=11
b
oundary, NULL));
281
282        if : true=0, false=0
i
f (strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(orig_ct : modules/http/byterange_filter.c line=273 column=21
o
rig_ct, NO_CONTENT_TYPE)) {
283            bound_head : modules/http/byterange_filter.c line=226 column=11
b
ound_head = : pass=0
=
 apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
284                                     CRLF "--", boundary : modules/http/byterange_filter.c line=225 column=11
b
oundary,
285                                     CRLF "Content-type: ",
286                                     orig_ct : modules/http/byterange_filter.c line=273 column=21
o
rig_ct,
287                                     CRLF "Content-range: bytes ",
288                                     NULL);
289        }
290        else {
291            /* if we have no type for the content, do our best */
292            bound_head : modules/http/byterange_filter.c line=226 column=11
b
ound_head = : pass=0
=
 apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
293                                     CRLF "--", boundary : modules/http/byterange_filter.c line=225 column=11
b
oundary,
294                                     CRLF "Content-range: bytes ",
295                                     NULL);
296        }
297        ap_xlate_proto_to_ascii(bound_head, strlen(bound_head));
298    }
299
300    tmpbb : modules/http/byterange_filter.c line=218 column=25
t
mpbb = : pass=0
=
 apr_brigade_create : enter=0, leave=0

apr_brigade_create : /usr/include/apr-1/apr_buckets.h line=658 column=35
a
pr_brigade_create(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
301
302    idx : modules/http/byterange_filter.c line=228 column=16
i
dx = : pass=0
=
 (indexes_t *)indexes : modules/http/byterange_filter.c line=227 column=25
i
ndexes-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
303    for : true=0, false=0
f
or (i : modules/http/byterange_filter.c line=229 column=9
i
 = : pass=0
=
 0; i : modules/http/byterange_filter.c line=229 column=9
i
 < : true=0, false=0
<
 indexes : modules/http/byterange_filter.c line=227 column=25
i
ndexes-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; i : modules/http/byterange_filter.c line=229 column=9
i
++ : pass=0
+
+, idx : modules/http/byterange_filter.c line=228 column=16
i
dx++ : pass=0
+
+) {
304        range_start : modules/http/byterange_filter.c line=219 column=15
r
ange_start = : pass=0
=
 idx : modules/http/byterange_filter.c line=228 column=16
i
dx-> : enter=0, leave=0
-
>start : modules/http/byterange_filter.c line=182 column=15
s
tart;
305        range_end : modules/http/byterange_filter.c line=220 column=15
r
ange_end = : pass=0
=
 idx : modules/http/byterange_filter.c line=228 column=16
i
dx-> : enter=0, leave=0
-
>end : modules/http/byterange_filter.c line=183 column=15
e
nd;
306
307        rv : modules/http/byterange_filter.c line=222 column=18
r
= : pass=0
=
 copy_brigade_range : enter=0, leave=0

copy_brigade_range : modules/http/byterange_filter.c line=82 column=21
c
opy_brigade_range(bb : modules/http/byterange_filter.c line=212 column=78
b
b, tmpbb : modules/http/byterange_filter.c line=218 column=25
t
mpbb, range_start : modules/http/byterange_filter.c line=219 column=15
r
ange_start, range_end : modules/http/byterange_filter.c line=220 column=15
r
ange_end);
308        if : true=0, false=0
i
f (rv : modules/http/byterange_filter.c line=222 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS ) {
309            ap_log_rerror : enter=0, leave=0

ap_log_rerror : include/http_log.h line=219 column=18
a
p_log_rerror(APLOG_MARK, APLOG_ERR, rv : modules/http/byterange_filter.c line=222 column=18
r
v, r : modules/http/byterange_filter.c line=214 column=18
r
,
310                          "copy_brigade_range() failed [%" APR_OFF_T_FMT
311                          "-%" APR_OFF_T_FMT ",%" APR_OFF_T_FMT "]",
312                          range_start : modules/http/byterange_filter.c line=219 column=15
r
ange_start, range_end : modules/http/byterange_filter.c line=220 column=15
r
ange_end, clength : modules/http/byterange_filter.c line=221 column=15
c
length);
313            continue : pass=0
c
ontinue;
314        }
315        found : modules/http/byterange_filter.c line=223 column=9
f
ound = : pass=0
=
 1;
316
317        /*
318         * For single range requests, we must produce Content-Range header.
319         * Otherwise, we need to produce the multipart boundaries.
320         */
321        if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges == : true=0, false=0
=
= 1) {
322            apr_table_setn : enter=0, leave=0

apr_table_setn : /usr/include/apr-1/apr_tables.h line=282 column=19
a
pr_table_setn(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Content-Range",
323                           apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, "bytes " BYTERANGE_FMT,
324                                        range_start : modules/http/byterange_filter.c line=219 column=15
r
ange_start, range_end : modules/http/byterange_filter.c line=220 column=15
r
ange_end, clength : modules/http/byterange_filter.c line=221 column=15
c
length));
325        }
326        else {
327            char *ts;
328
329            e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 apr_bucket_pool_create : enter=0, leave=0

apr_bucket_pool_create : /usr/include/apr-1/apr_buckets.h line=1373 column=27
a
pr_bucket_pool_create(bound_head : modules/http/byterange_filter.c line=226 column=11
b
ound_head, strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(bound_head : modules/http/byterange_filter.c line=226 column=11
b
ound_head),
330                                       r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
331            APR_BRIGADE_INSERT_TAIL(bsend : modules/http/byterange_filter.c line=217 column=25
b
send, e : modules/http/byterange_filter.c line=216 column=17
e
);
332
333            ts : modules/http/byterange_filter.c line=327 column=19
t
= : pass=0
=
 apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, BYTERANGE_FMT CRLF CRLF,
334                              range_start : modules/http/byterange_filter.c line=219 column=15
r
ange_start, range_end : modules/http/byterange_filter.c line=220 column=15
r
ange_end, clength : modules/http/byterange_filter.c line=221 column=15
c
length);
335            ap_xlate_proto_to_ascii(ts, strlen(ts));
336            e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 apr_bucket_pool_create : enter=0, leave=0

apr_bucket_pool_create : /usr/include/apr-1/apr_buckets.h line=1373 column=27
a
pr_bucket_pool_create(ts : modules/http/byterange_filter.c line=327 column=19
t
s, strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(ts : modules/http/byterange_filter.c line=327 column=19
t
s), r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
337                                       c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
338            APR_BRIGADE_INSERT_TAIL(bsend : modules/http/byterange_filter.c line=217 column=25
b
send, e : modules/http/byterange_filter.c line=216 column=17
e
);
339        }
340
341        APR_BRIGADE_CONCAT(bsend : modules/http/byterange_filter.c line=217 column=25
b
send, tmpbb : modules/http/byterange_filter.c line=218 column=25
t
mpbb);
342        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

i : modules/http/byterange_filter.c line=229 column=9
iTF
 && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(i : modules/http/byterange_filter.c line=229 column=9
i
 & : pass=0
&
 0x1F)) {
343            /*
344             * Every now and then, pass what we have down the filter chain.
345             * In this case, the content-length filter cannot calculate and
346             * set the content length and we must remove any Content-Length
347             * header already present.
348             */
349            apr_table_unset : enter=0, leave=0

apr_table_unset : /usr/include/apr-1/apr_tables.h line=290 column=19
a
pr_table_unset(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Content-Length");
350            if : true=0, false=0
i
f ((rv : modules/http/byterange_filter.c line=222 column=18
r
= : pass=0
=
 ap_pass_brigade : enter=0, leave=0

ap_pass_brigade : include/util_filter.h line=312 column=26
a
p_pass_brigade(f : modules/http/byterange_filter.c line=211 column=71
f
-> : enter=0, leave=0
-
>next : include/util_filter.h line=271 column=18
n
ext, bsend : modules/http/byterange_filter.c line=217 column=25
b
send)) != : true=0, false=0
!
= APR_SUCCESS)
351                return : pass=0
r
eturn rv : modules/http/byterange_filter.c line=222 column=18
r
v;
352            apr_brigade_cleanup : enter=0, leave=0

apr_brigade_cleanup : /usr/include/apr-1/apr_buckets.h line=679 column=27
a
pr_brigade_cleanup(bsend : modules/http/byterange_filter.c line=217 column=25
b
send);
353        }
354    }
355
356    if : true=0, false=0
i
f (found : modules/http/byterange_filter.c line=223 column=9
f
ound == : true=0, false=0
=
= 0) {
357        /* bsend is assumed to be empty if we get here. */
358        return : pass=0
r
eturn send_416 : enter=0, leave=0

send_416 : modules/http/byterange_filter.c line=197 column=21
s
end_416(f : modules/http/byterange_filter.c line=211 column=71
f
bsend : modules/http/byterange_filter.c line=217 column=25
b
send);
359    }
360
361    if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=224 column=9
n
um_ranges > : true=0, false=0
>
 1) {
362        char *end;
363
364        /* add the final boundary */
365        end : modules/http/byterange_filter.c line=362 column=15
e
nd = : pass=0
=
 apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, CRLF "--", boundary : modules/http/byterange_filter.c line=225 column=11
b
oundary, "--" CRLF, NULL);
366        ap_xlate_proto_to_ascii(end, strlen(end));
367        e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 apr_bucket_pool_create : enter=0, leave=0

apr_bucket_pool_create : /usr/include/apr-1/apr_buckets.h line=1373 column=27
a
pr_bucket_pool_create(end : modules/http/byterange_filter.c line=362 column=15
e
nd, strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(end : modules/http/byterange_filter.c line=362 column=15
e
nd), r : modules/http/byterange_filter.c line=214 column=18
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
368        APR_BRIGADE_INSERT_TAIL(bsend : modules/http/byterange_filter.c line=217 column=25
b
send, e : modules/http/byterange_filter.c line=216 column=17
e
);
369    }
370
371    e : modules/http/byterange_filter.c line=216 column=17
e
 = : pass=0
=
 apr_bucket_eos_create : enter=0, leave=0

apr_bucket_eos_create : /usr/include/apr-1/apr_buckets.h line=1260 column=27
a
pr_bucket_eos_create(c : modules/http/byterange_filter.c line=215 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
372    APR_BRIGADE_INSERT_TAIL(bsend : modules/http/byterange_filter.c line=217 column=25
b
send, e : modules/http/byterange_filter.c line=216 column=17
e
);
373
374    /* we're done with the original content - all of our data is in bsend. */
375    apr_brigade_cleanup : enter=0, leave=0

apr_brigade_cleanup : /usr/include/apr-1/apr_buckets.h line=679 column=27
a
pr_brigade_cleanup(bb : modules/http/byterange_filter.c line=212 column=78
b
b);
376    apr_brigade_destroy : enter=0, leave=0

apr_brigade_destroy : /usr/include/apr-1/apr_buckets.h line=666 column=27
a
pr_brigade_destroy(tmpbb : modules/http/byterange_filter.c line=218 column=25
t
mpbb);
377
378    /* send our multipart output */
379    return : pass=0
r
eturn ap_pass_brigade : enter=0, leave=0

ap_pass_brigade : include/util_filter.h line=312 column=26
a
p_pass_brigade(f : modules/http/byterange_filter.c line=211 column=71
f
-> : enter=0, leave=0
-
>next : include/util_filter.h line=271 column=18
n
ext, bsend : modules/http/byterange_filter.c line=217 column=25
b
send);
380}
381
382static int ap_set_byterange : call=0
a
p_set_byterange(request_rec *r, apr_off_t clength,
383                            apr_array_header_t **indexes)
384{
385    const char *range;
386    const char *if_range;
387    const char *match;
388    const char *ct;
389    char *cur;
390    int num_ranges = 0, unsatisfiable = 0;
391    apr_off_t sum_lengths = 0;
392    indexes_t *idx;
393    int ranges = 1;
394    const char *it;
395
396    if : true=0, false=0
i
f (r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>assbackwards : include/httpd.h line=801 column=9
a
ssbackwards) {
397        return : pass=0
r
eturn 0;
398    }
399
400    /*
401     * Check for Range request-header (HTTP/1.1) or Request-Range for
402     * backwards-compatibility with second-draft Luotonen/Franks
403     * byte-ranges (e.g. Netscape Navigator 2-3).
404     *
405     * We support this form, with Request-Range, and (farther down) we
406     * send multipart/x-byteranges instead of multipart/byteranges for
407     * Request-Range based requests to work around a bug in Netscape
408     * Navigator 2-3 and MSIE 3.
409     */
410
411    if : true=0, false=0
i
f (! : true=0, false=0
!
(range : modules/http/byterange_filter.c line=385 column=17
r
ange = : pass=0
=
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "Range"))) {
412        range : modules/http/byterange_filter.c line=385 column=17
r
ange = : pass=0
=
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "Request-Range");
413    }
414
415    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
range : modules/http/byterange_filter.c line=385 column=17
r
ange || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
sTF
trncasecmp(range : modules/http/byterange_filter.c line=385 column=17
r
ange, "bytes=", 6) || : true=0, false=0
|
r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= HTTP_OK) {
416        return : pass=0
r
eturn 0;
417    }
418
419    /* is content already a single range? */
420    if : true=0, false=0
i
f (apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Content-Range")) {
421       return : pass=0
r
eturn 0;
422    }
423
424    /* is content already a multiple range? */
425    if : true=0, false=0
i
f ((ct : modules/http/byterange_filter.c line=388 column=17
c
= : pass=0
MC/DC independently affect : true=0, false=0
=TF
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Content-Type"))
426        && : true=0, false=0
&
& (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
s
trncasecmp(ct : modules/http/byterange_filter.c line=388 column=17
c
t, "multipart/byteranges", 20)
427            || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
s
trncasecmp(ct : modules/http/byterange_filter.c line=388 column=17
c
t, "multipart/x-byteranges", 22))) {
428       return : pass=0
r
eturn 0;
429    }
430
431    /*
432     * Check the If-Range header for Etag or Date.
433     * Note that this check will return false (as required) if either
434     * of the two etags are weak.
435     */
436    if : true=0, false=0
i
f ((if_range : modules/http/byterange_filter.c line=386 column=17
i
f_range = : pass=0
=
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "If-Range"))) {
437        if : true=0, false=0
i
f (if_range : modules/http/byterange_filter.c line=386 column=17
i
f_range[] : enter=0, leave=0
[
0] == : true=0, false=0
=
= '"') {
438            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(match : modules/http/byterange_filter.c line=387 column=17
m
atch = : pass=0
=
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Etag"))
439                || : true=0, false=0
|
| (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(if_range : modules/http/byterange_filter.c line=386 column=17
i
f_range, match : modules/http/byterange_filter.c line=387 column=17
m
atch) != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= 0)) {
440                return : pass=0
r
eturn 0;
441            }
442        }
443        else if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(match : modules/http/byterange_filter.c line=387 column=17
m
atch = : pass=0
=
 apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Last-Modified"))
444                 || : true=0, false=0
|
| (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(if_range : modules/http/byterange_filter.c line=386 column=17
i
f_range, match : modules/http/byterange_filter.c line=387 column=17
m
atch) != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= 0)) {
445            return : pass=0
r
eturn 0;
446        }
447    }
448
449    range : modules/http/byterange_filter.c line=385 column=17
r
ange += : pass=0
+
= 6;
450    it : modules/http/byterange_filter.c line=394 column=17
i
= : pass=0
=
 range : modules/http/byterange_filter.c line=385 column=17
r
ange;
451    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
it : modules/http/byterange_filter.c line=394 column=17
i
t) {
452        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
it : modules/http/byterange_filter.c line=394 column=17
i
t++ : pass=0
+
== : true=0, false=0
=
= ',') {
453            ranges : modules/http/byterange_filter.c line=393 column=9
r
anges++ : pass=0
+
+;
454        }
455    }
456    it : modules/http/byterange_filter.c line=394 column=17
i
= : pass=0
=
 range : modules/http/byterange_filter.c line=385 column=17
r
ange;
457    *indexes : modules/http/byterange_filter.c line=383 column=50
i
ndexes = : enter=0, leave=0
=
 apr_array_make : enter=0, leave=0

apr_array_make : /usr/include/apr-1/apr_tables.h line=111 column=35
a
pr_array_make(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, ranges : modules/http/byterange_filter.c line=393 column=9
r
anges, sizeof(indexes_t));
458    while : true=0, false=0
w
hile ((cur : modules/http/byterange_filter.c line=389 column=11
c
ur = : pass=0
=
 ap_getword : enter=0, leave=0

ap_getword : include/httpd.h line=1299 column=20
a
p_getword(r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, &range : modules/http/byterange_filter.c line=385 column=17
r
ange, ','))) {
459        char *dash;
460        char *errp;
461        apr_off_t number, start, end;
462
463        if : true=0, false=0
i
f (! : true=0, false=0
!
* dereference : enter=0, leave=0
*
cur : modules/http/byterange_filter.c line=389 column=11
c
ur)
464            break : pass=0
b
reak;
465
466        /*
467         * Per RFC 2616 14.35.1: If there is at least one syntactically invalid
468         * byte-range-spec, we must ignore the whole header.
469         */
470
471        if : true=0, false=0
i
f (! : true=0, false=0
!
(dash : modules/http/byterange_filter.c line=459 column=15
d
ash = : pass=0
=
 strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(cur : modules/http/byterange_filter.c line=389 column=11
c
ur, '-'))) {
472            return : pass=0
r
eturn 0;
473        }
474
475        if : true=0, false=0
i
f (dash : modules/http/byterange_filter.c line=459 column=15
d
ash == : true=0, false=0
=
cur : modules/http/byterange_filter.c line=389 column=11
c
ur) {
476            /* In the form "-5" */
477            if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0
apr_strtoff : enter=0, leave=0

apr_strtoff : /usr/include/apr-1/apr_strings.h line=317 column=27
aTF
pr_strtoff(&number : modules/http/byterange_filter.c line=461 column=19
n
umber, dash : modules/http/byterange_filter.c line=459 column=15
d
ash+ : pass=0
+
1, &errp : modules/http/byterange_filter.c line=460 column=15
e
rrp, 10) || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
errp : modules/http/byterange_filter.c line=460 column=15
e
rrp) {
478                return : pass=0
r
eturn 0;
479            }
480            if : true=0, false=0
i
f (number : modules/http/byterange_filter.c line=461 column=19
n
umber < : true=0, false=0
<
 1) {
481                return : pass=0
r
eturn 0;
482            }
483            start : modules/http/byterange_filter.c line=461 column=27
s
tart = : pass=0
=
 clength : modules/http/byterange_filter.c line=382 column=55
c
length - : pass=0
-
 number : modules/http/byterange_filter.c line=461 column=19
n
umber;
484            end : modules/http/byterange_filter.c line=461 column=34
e
nd = : pass=0
=
 clength : modules/http/byterange_filter.c line=382 column=55
c
length - : pass=0
-
 1;
485        }
486        else {
487            *dash : modules/http/byterange_filter.c line=459 column=15
d
ash++ : pass=0
+
= : enter=0, leave=0
=
 '\0';
488            if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0
apr_strtoff : enter=0, leave=0

apr_strtoff : /usr/include/apr-1/apr_strings.h line=317 column=27
aTF
pr_strtoff(&number : modules/http/byterange_filter.c line=461 column=19
n
umber, cur : modules/http/byterange_filter.c line=389 column=11
c
ur, &errp : modules/http/byterange_filter.c line=460 column=15
e
rrp, 10) || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
errp : modules/http/byterange_filter.c line=460 column=15
e
rrp) {
489                return : pass=0
r
eturn 0;
490            }
491            start : modules/http/byterange_filter.c line=461 column=27
s
tart = : pass=0
=
 number : modules/http/byterange_filter.c line=461 column=19
n
umber;
492            if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
dash : modules/http/byterange_filter.c line=459 column=15
d
ash) {
493                if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0
apr_strtoff : enter=0, leave=0

apr_strtoff : /usr/include/apr-1/apr_strings.h line=317 column=27
aTF
pr_strtoff(&number : modules/http/byterange_filter.c line=461 column=19
n
umber, dash : modules/http/byterange_filter.c line=459 column=15
d
ash, &errp : modules/http/byterange_filter.c line=460 column=15
e
rrp, 10) || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
errp : modules/http/byterange_filter.c line=460 column=15
e
rrp) {
494                    return : pass=0
r
eturn 0;
495                }
496                end : modules/http/byterange_filter.c line=461 column=34
e
nd = : pass=0
=
 number : modules/http/byterange_filter.c line=461 column=19
n
umber;
497                if : true=0, false=0
i
f (start : modules/http/byterange_filter.c line=461 column=27
s
tart > : true=0, false=0
>
 end : modules/http/byterange_filter.c line=461 column=34
e
nd) {
498                    return : pass=0
r
eturn 0;
499                }
500            }
501            else {                  /* "5-" */
502                end : modules/http/byterange_filter.c line=461 column=34
e
nd = : pass=0
=
 clength : modules/http/byterange_filter.c line=382 column=55
c
length - : pass=0
-
 1;
503                /*
504                 * special case: 0-
505                 *   ignore all other ranges provided
506                 *   return as a single range: 0-
507                 */
508                if : true=0, false=0
i
f (start : modules/http/byterange_filter.c line=461 column=27
s
tart == : true=0, false=0
=
= 0) {
509                    (* dereference : enter=0, leave=0
*
indexes : modules/http/byterange_filter.c line=383 column=50
i
ndexes)-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts = : enter=0, leave=0
=
 0;
510                    idx : modules/http/byterange_filter.c line=392 column=16
i
dx = : pass=0
=
 (indexes_t *)apr_array_push : enter=0, leave=0

apr_array_push : /usr/include/apr-1/apr_tables.h line=121 column=21
a
pr_array_push(* dereference : enter=0, leave=0
*
indexes : modules/http/byterange_filter.c line=383 column=50
i
ndexes);
511                    idx : modules/http/byterange_filter.c line=392 column=16
i
dx-> : enter=0, leave=0
-
>start : modules/http/byterange_filter.c line=182 column=15
s
tart = : enter=0, leave=0
=
 start : modules/http/byterange_filter.c line=461 column=27
s
tart;
512                    idx : modules/http/byterange_filter.c line=392 column=16
i
dx-> : enter=0, leave=0
-
>end : modules/http/byterange_filter.c line=183 column=15
e
nd = : enter=0, leave=0
=
 end : modules/http/byterange_filter.c line=461 column=34
e
nd;
513                    sum_lengths : modules/http/byterange_filter.c line=391 column=15
s
um_lengths = : pass=0
=
 clength : modules/http/byterange_filter.c line=382 column=55
c
length;
514                    num_ranges : modules/http/byterange_filter.c line=390 column=9
n
um_ranges = : pass=0
=
 1;
515                    break : pass=0
b
reak;
516                }
517            }
518        }
519
520        if : true=0, false=0
i
f (start : modules/http/byterange_filter.c line=461 column=27
s
tart < : true=0, false=0
<
 0) {
521            start : modules/http/byterange_filter.c line=461 column=27
s
tart = : pass=0
=
 0;
522        }
523        if : true=0, false=0
i
f (start : modules/http/byterange_filter.c line=461 column=27
s
tart >= : true=0, false=0
>
clength : modules/http/byterange_filter.c line=382 column=55
c
length) {
524            unsatisfiable : modules/http/byterange_filter.c line=390 column=25
u
nsatisfiable = : pass=0
=
 1;
525            continue : pass=0
c
ontinue;
526        }
527        if : true=0, false=0
i
f (end : modules/http/byterange_filter.c line=461 column=34
e
nd >= : true=0, false=0
>
clength : modules/http/byterange_filter.c line=382 column=55
c
length) {
528            end : modules/http/byterange_filter.c line=461 column=34
e
nd = : pass=0
=
 clength : modules/http/byterange_filter.c line=382 column=55
c
length - : pass=0
-
 1;
529        }
530
531        idx : modules/http/byterange_filter.c line=392 column=16
i
dx = : pass=0
=
 (indexes_t *)apr_array_push : enter=0, leave=0

apr_array_push : /usr/include/apr-1/apr_tables.h line=121 column=21
a
pr_array_push(* dereference : enter=0, leave=0
*
indexes : modules/http/byterange_filter.c line=383 column=50
i
ndexes);
532        idx : modules/http/byterange_filter.c line=392 column=16
i
dx-> : enter=0, leave=0
-
>start : modules/http/byterange_filter.c line=182 column=15
s
tart = : enter=0, leave=0
=
 start : modules/http/byterange_filter.c line=461 column=27
s
tart;
533        idx : modules/http/byterange_filter.c line=392 column=16
i
dx-> : enter=0, leave=0
-
>end : modules/http/byterange_filter.c line=183 column=15
e
nd = : enter=0, leave=0
=
 end : modules/http/byterange_filter.c line=461 column=34
e
nd;
534        sum_lengths : modules/http/byterange_filter.c line=391 column=15
s
um_lengths += : pass=0
+
end : modules/http/byterange_filter.c line=461 column=34
e
nd - : pass=0
-
 start : modules/http/byterange_filter.c line=461 column=27
s
tart + : pass=0
+
 1;
535        /* new set again */
536        num_ranges : modules/http/byterange_filter.c line=390 column=9
n
um_ranges++ : pass=0
+
+;
537    }
538
539    if : true=0, false=0
i
f (num_ranges : modules/http/byterange_filter.c line=390 column=9
n
um_ranges == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0 && : true=0, false=0
&
MC/DC independently affect : true=0, false=0

unsatisfiable : modules/http/byterange_filter.c line=390 column=25
uTF
nsatisfiable) {
540        /* If all ranges are unsatisfiable, we should return 416 */
541        return : pass=0
r
eturn -1;
542    }
543    if : true=0, false=0
i
f (sum_lengths : modules/http/byterange_filter.c line=391 column=15
s
um_lengths > : true=0, false=0
>
 clength : modules/http/byterange_filter.c line=382 column=55
c
length) {
544        ap_log_rerror : enter=0, leave=0

ap_log_rerror : include/http_log.h line=219 column=18
a
p_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r : modules/http/byterange_filter.c line=382 column=42
r
,
545                      "Sum of ranges larger than file, ignoring.");
546        return : pass=0
r
eturn 0;
547    }
548
549    r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus = : enter=0, leave=0
=
 HTTP_PARTIAL_CONTENT;
550    r : modules/http/byterange_filter.c line=382 column=42
r
-> : enter=0, leave=0
-
>range : include/httpd.h line=871 column=17
r
ange = : enter=0, leave=0
=
 it : modules/http/byterange_filter.c line=394 column=17
i
t;
551
552    return : pass=0
r
eturn num_ranges : modules/http/byterange_filter.c line=390 column=9
n
um_ranges;
553}
554[EOF]


Generated by expcov