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

 Index  Statistics  Last 
Directory./modules/generators
Filenamemod_asis.c
ModifiedSat Jun 6 01:50:47 2015

Pass Half Fail Excluded Total
Function
1
50.00%
1
50.00%
0
0.00%
2
100%
Expressions
1
1.64%
60
98.36%
0
0.00%
61
100%
Conditions
0
0.00%
0
0.00%
12
100.00%
0
0.00%
12
100%
MC/DC
0
0.00%
5
100.00%
0
0.00%
5
100%
Branches

if
0
0.00%
0
0.00%
8
100.00%
0
0.00%
8
100%
for
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%
while
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
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#include "apr_strings.h"
18#include "ap_config.h"
19#include "httpd.h"
20#include "http_config.h"
21#include "http_protocol.h"
22#include "http_log.h"
23#include "util_script.h"
24#include "http_main.h"
25#include "http_request.h"
26
27#include "mod_core.h"
28
29#define ASIS_MAGIC_TYPE "httpd/send-as-is"
30
31static int asis_handler : call=0
a
sis_handler(request_rec *r)
32{
33    conn_rec *c = r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection;
34    apr_file_t *f = NULL;
35    apr_status_t rv;
36    const char *location;
37
38    if : true=0, false=0
i
f(MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler,ASIS_MAGIC_TYPE) && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler,"send-as-is"))
39        return : pass=0
r
eturn DECLINED;
40
41    r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>allowed : include/httpd.h line=853 column=17
a
llowed |= : enter=0, leave=0
|
= (AP_METHOD_BIT << : pass=0
<
< M_GET);
42    if : true=0, false=0
i
f (r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number != : true=0, false=0
!
= M_GET)
43        return : pass=0
r
eturn DECLINED;
44    if : true=0, false=0
i
f (r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>finfo : include/httpd.h line=957 column=17
f
info.filetype : /usr/include/apr-1/apr_file_info.h line=186 column=20 filetype == : true=0, false=0
=
= 0) {
45        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, 0, r : modules/generators/mod_asis.c line=31 column=38
r
,
46                    "File does not exist: %s", r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
47        return : pass=0
r
eturn HTTP_NOT_FOUND;
48    }
49
50    if : true=0, false=0
i
f ((rv : modules/generators/mod_asis.c line=35 column=18
r
= : pass=0
=
 apr_file_open : enter=0, leave=0

apr_file_open : /usr/include/apr-1/apr_file_io.h line=235 column=27
a
pr_file_open(&f : modules/generators/mod_asis.c line=34 column=17
f
r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename, APR_READ,
51                APR_OS_DEFAULT, r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool)) != : true=0, false=0
!
= APR_SUCCESS) {
52        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/generators/mod_asis.c line=35 column=18
r
v, r : modules/generators/mod_asis.c line=31 column=38
r
,
53                    "file permissions deny server access: %s", r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
54        return : pass=0
r
eturn HTTP_FORBIDDEN;
55    }
56
57    ap_scan_script_header_err : enter=0, leave=0

ap_scan_script_header_err : include/util_script.h line=90 column=17
a
p_scan_script_header_err(r : modules/generators/mod_asis.c line=31 column=38
r
f : modules/generators/mod_asis.c line=34 column=17
f
, NULL);
58    location : modules/generators/mod_asis.c line=36 column=17
l
ocation = : 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/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>headers_out : include/httpd.h line=903 column=18
h
eaders_out, "Location");
59
60    if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

location : modules/generators/mod_asis.c line=36 column=17
lTF
ocation && : true=0, false=0
&
location : modules/generators/mod_asis.c line=36 column=17
l
ocation[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '/' && : true=0, false=0
&
&
61        ((r : modules/generators/mod_asis.c line=31 column=38
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) || : true=0, false=0
|
| ap_is_HTTP_REDIRECT(r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus))) {
62
63        apr_file_close : enter=0, leave=0

apr_file_close : /usr/include/apr-1/apr_file_io.h line=243 column=27
a
pr_file_close(f : modules/generators/mod_asis.c line=34 column=17
f
);
64
65        /* Internal redirect -- fake-up a pseudo-request */
66        r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus = : enter=0, leave=0
=
 HTTP_OK;
67
68        /* This redirect needs to be a GET no matter what the original
69         * method was.
70         */
71        r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>method : include/httpd.h line=829 column=17
m
ethod = : enter=0, leave=0
=
 apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, "GET");
72        r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number = : enter=0, leave=0
=
 M_GET;
73
74        ap_internal_redirect_handler : enter=0, leave=0

ap_internal_redirect_handler : include/http_request.h line=166 column=18
a
p_internal_redirect_handler(location : modules/generators/mod_asis.c line=36 column=17
l
ocation, r : modules/generators/mod_asis.c line=31 column=38
r
);
75        return : pass=0
r
eturn OK;
76    }
77
78    if : true=0, false=0
i
f (! : true=0, false=0
!
r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>header_only : include/httpd.h line=808 column=9
h
eader_only) {
79        apr_bucket_brigade *bb;
80        apr_bucket *b;
81        apr_off_t pos = 0;
82
83        rv : modules/generators/mod_asis.c line=35 column=18
r
= : pass=0
=
 apr_file_seek : enter=0, leave=0

apr_file_seek : /usr/include/apr-1/apr_file_io.h line=630 column=27
a
pr_file_seek(f : modules/generators/mod_asis.c line=34 column=17
f
, APR_CUR, &pos : modules/generators/mod_asis.c line=81 column=19
p
os);
84        if : true=0, false=0
i
f (rv : modules/generators/mod_asis.c line=35 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
85            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/generators/mod_asis.c line=35 column=18
r
v, r : modules/generators/mod_asis.c line=31 column=38
r
,
86                          "mod_asis: failed to find end-of-headers position "
87                          "for %s", r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
88            apr_file_close : enter=0, leave=0

apr_file_close : /usr/include/apr-1/apr_file_io.h line=243 column=27
a
pr_file_close(f : modules/generators/mod_asis.c line=34 column=17
f
);
89            return : pass=0
r
eturn HTTP_INTERNAL_SERVER_ERROR;
90        }
91
92        bb : modules/generators/mod_asis.c line=79 column=29
b
= : 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/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/generators/mod_asis.c line=33 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
93#if APR_HAS_LARGE_FILES
94        if (r->finfo.size - pos > AP_MAX_SENDFILE) {
95            /* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
96             * no greater than MAX(apr_size_t), and more granular than that
97             * in case the brigade code/filters attempt to read it directly.
98             */
99            apr_off_t fsize = r->finfo.size - pos;
100            b = apr_bucket_file_create(f, pos, AP_MAX_SENDFILE,
101                                       r->pool, c->bucket_alloc);
102            while (fsize > AP_MAX_SENDFILE) {
103                APR_BRIGADE_INSERT_TAIL(bb, b);
104                apr_bucket_copy(b, &b);
105                b->start += AP_MAX_SENDFILE;
106                fsize -= AP_MAX_SENDFILE;
107            }
108            b->length = (apr_size_t)fsize; /* Resize just the last bucket */
109        }
110        else
111#endif
112        b : modules/generators/mod_asis.c line=80 column=21
b
 = : pass=0
=
 apr_bucket_file_create : enter=0, leave=0

apr_bucket_file_create : /usr/include/apr-1/apr_buckets.h line=1470 column=27
a
pr_bucket_file_create(f : modules/generators/mod_asis.c line=34 column=17
f
pos : modules/generators/mod_asis.c line=81 column=19
p
os, (apr_size_t) (r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>finfo : include/httpd.h line=957 column=17
f
info.size : /usr/include/apr-1/apr_file_info.h line=198 column=15 size - : pass=0
-
 pos : modules/generators/mod_asis.c line=81 column=19
p
os),
113                                   r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/generators/mod_asis.c line=33 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
114        APR_BRIGADE_INSERT_TAIL(bb : modules/generators/mod_asis.c line=79 column=29
b
b, b : modules/generators/mod_asis.c line=80 column=21
b
);
115        b : modules/generators/mod_asis.c line=80 column=21
b
 = : 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/generators/mod_asis.c line=33 column=15
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
116        APR_BRIGADE_INSERT_TAIL(bb : modules/generators/mod_asis.c line=79 column=29
b
b, b : modules/generators/mod_asis.c line=80 column=21
b
);
117        rv : modules/generators/mod_asis.c line=35 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(r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>output_filters : include/httpd.h line=990 column=25
o
utput_filters, bb : modules/generators/mod_asis.c line=79 column=29
b
b);
118        if : true=0, false=0
i
f (rv : modules/generators/mod_asis.c line=35 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
119            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/generators/mod_asis.c line=35 column=18
r
v, r : modules/generators/mod_asis.c line=31 column=38
r
,
120                          "mod_asis: ap_pass_brigade failed for file %s", r : modules/generators/mod_asis.c line=31 column=38
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
121            return : pass=0
r
eturn AP_FILTER_ERROR;
122        }
123    }
124    else {
125        apr_file_close : enter=0, leave=0

apr_file_close : /usr/include/apr-1/apr_file_io.h line=243 column=27
a
pr_file_close(f : modules/generators/mod_asis.c line=34 column=17
f
);
126    }
127
128    return : pass=0
r
eturn OK;
129}
130
131static void register_hooks : call=1
r
egister_hooks(apr_pool_t *p)
132{
133    ap_hook_handler : enter=1, leave=1

ap_hook_handler : modules/generators/ line=3 column=1
a
p_hook_handler(asis_handler : modules/generators/mod_asis.c line=31 column=12
a
sis_handler,NULL,NULL,APR_HOOK_MIDDLE);
134}
135
136module AP_MODULE_DECLARE_DATA asis_module =
137{
138    STANDARD20_MODULE_STUFF,
139    NULL,              /* create per-directory config structure */
140    NULL,              /* merge per-directory config structures */
141    NULL,              /* create per-server config structure */
142    NULL,              /* merge per-server config structures */
143    NULL,              /* command apr_table_t */
144    register_hooks : modules/generators/mod_asis.c line=131 column=13
r
egister_hooks     /* register hooks */
145};
146[EOF]


Generated by expcov