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

 Index  Statistics  Last 
Directory./modules/mappers
Filenamemod_negotiation.c
ModifiedSat Aug 18 05:17:59 2012

Pass Half Fail Excluded Total
Function
2
4.26%
45
95.74%
0
0.00%
47
100%
Expressions
7
0.41%
1719
99.59%
0
0.00%
1726
100%
Conditions
0
0.00%
0
0.00%
505
100.00%
0
0.00%
505
100%
MC/DC
0
0.00%
263
100.00%
0
0.00%
263
100%
Branches

if
0
0.00%
0
0.00%
257
100.00%
0
0.00%
257
100%
for
0
0.00%
0
0.00%
23
100.00%
0
0.00%
23
100%
while
0
0.00%
0
0.00%
20
100.00%
0
0.00%
20
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 * mod_negotiation.c: keeps track of MIME types the client is willing to
19 * accept, and contains code to handle type arbitration.
20 *
21 * rst
22 */
23
24#include "apr.h"
25#include "apr_strings.h"
26#include "apr_file_io.h"
27#include "apr_lib.h"
28
29#define APR_WANT_STRFUNC
30#include "apr_want.h"
31
32#include "ap_config.h"
33#include "httpd.h"
34#include "http_config.h"
35#include "http_request.h"
36#include "http_protocol.h"
37#include "http_core.h"
38#include "http_log.h"
39#include "util_script.h"
40
41
42#define MAP_FILE_MAGIC_TYPE "application/x-type-map"
43
44/* Commands --- configuring document caching on a per (virtual?)
45 * server basis...
46 */
47
48typedef struct {
49    int forcelangpriority;
50    apr_array_header_t *language_priority;
51} neg_dir_config;
52
53/* forcelangpriority flags
54 */
55#define FLP_UNDEF    0    /* Same as FLP_DEFAULT, but base overrides */
56#define FLP_NONE     1    /* Return 406, HTTP_NOT_ACCEPTABLE */
57#define FLP_PREFER   2    /* Use language_priority rather than MC */
58#define FLP_FALLBACK 4    /* Use language_priority rather than NA */
59
60#define FLP_DEFAULT  FLP_PREFER
61
62/* env evaluation
63 */
64#define DISCARD_ALL_ENCODINGS 1  /* no-gzip */
65#define DISCARD_ALL_BUT_HTML  2  /* gzip-only-text/html */
66
67module AP_MODULE_DECLARE_DATA negotiation_module;
68
69static void *create_neg_dir_config : call=1
c
reate_neg_dir_config(apr_pool_t *p, char *dummy)
70{
71    neg_dir_config *new = (neg_dir_config *) apr_palloc : enter=1, leave=1

apr_palloc : /usr/include/apr-1/apr_pools.h line=419 column=21
a
pr_palloc(p : modules/mappers/mod_negotiation.c line=69 column=48
p
,
72                                                        sizeof(neg_dir_config));
73
74    new : modules/mappers/mod_negotiation.c line=71 column=21
n
ew-> : enter=1, leave=1
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority = : enter=1, leave=1
=
 FLP_UNDEF;
75    new : modules/mappers/mod_negotiation.c line=71 column=21
n
ew-> : enter=1, leave=1
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority = : enter=1, leave=1
=
 NULL;
76    return : pass=1
r
eturn new : modules/mappers/mod_negotiation.c line=71 column=21
n
ew;
77}
78
79static void *merge_neg_dir_configs : call=0
m
erge_neg_dir_configs(apr_pool_t *p, void *basev, void *addv)
80{
81    neg_dir_config *base = (neg_dir_config *) basev : modules/mappers/mod_negotiation.c line=79 column=57
b
asev;
82    neg_dir_config *add = (neg_dir_config *) addv : modules/mappers/mod_negotiation.c line=79 column=70
a
ddv;
83    neg_dir_config *new = (neg_dir_config *) apr_palloc : enter=0, leave=0

apr_palloc : /usr/include/apr-1/apr_pools.h line=419 column=21
a
pr_palloc(p : modules/mappers/mod_negotiation.c line=79 column=48
p
,
84                                                        sizeof(neg_dir_config));
85
86    /* give priority to the config in the subdirectory */
87    new : modules/mappers/mod_negotiation.c line=83 column=21
n
ew-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority = : enter=0, leave=0
=
 (add : modules/mappers/mod_negotiation.c line=82 column=21
a
dd-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority != : true=0, false=0
!
= FLP_UNDEF)
88                                conditional operator : true=0, false=0
?
 add : modules/mappers/mod_negotiation.c line=82 column=21
a
dd-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority
89                                : base : modules/mappers/mod_negotiation.c line=81 column=21
b
ase-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority;
90    new : modules/mappers/mod_negotiation.c line=83 column=21
n
ew-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority = : enter=0, leave=0
=
 add : modules/mappers/mod_negotiation.c line=82 column=21
a
dd-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority
91                                conditional operator : true=0, false=0
?
 add : modules/mappers/mod_negotiation.c line=82 column=21
a
dd-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority
92                                : base : modules/mappers/mod_negotiation.c line=81 column=21
b
ase-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority;
93    return : pass=0
r
eturn new : modules/mappers/mod_negotiation.c line=83 column=21
n
ew;
94}
95
96static const char *set_language_priority : call=0
s
et_language_priority(cmd_parms *cmd, void *n_,
97                                         const char *lang)
98{
99    neg_dir_config *n = n_ : modules/mappers/mod_negotiation.c line=96 column=64
n
_;
100    const char **langp;
101
102    if : true=0, false=0
i
f (! : true=0, false=0
!
n : modules/mappers/mod_negotiation.c line=99 column=21
n
-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority)
103        n : modules/mappers/mod_negotiation.c line=99 column=21
n
-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority = : 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(cmd : modules/mappers/mod_negotiation.c line=96 column=53
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, 4, sizeof(char *));
104
105    langp : modules/mappers/mod_negotiation.c line=100 column=18
l
angp = : pass=0
=
 (const char **) 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(n : modules/mappers/mod_negotiation.c line=99 column=21
n
-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority);
106    *langp : modules/mappers/mod_negotiation.c line=100 column=18
l
angp = : enter=0, leave=0
=
 lang : modules/mappers/mod_negotiation.c line=97 column=54
l
ang;
107    return : pass=0
r
eturn NULL;
108}
109
110static const char *set_force_priority : call=0
s
et_force_priority(cmd_parms *cmd, void *n_, const char *w)
111{
112    neg_dir_config *n = n_ : modules/mappers/mod_negotiation.c line=110 column=61
n
_;
113
114    if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(w : modules/mappers/mod_negotiation.c line=110 column=77
w
, "None")) {
115        if : true=0, false=0
i
f (n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority & : pass=0
&
 ~ : pass=0
~
FLP_NONE) {
116            return : pass=0
r
eturn "Cannot combine ForceLanguagePriority options with None";
117        }
118        n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority = : enter=0, leave=0
=
 FLP_NONE;
119    }
120    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(w : modules/mappers/mod_negotiation.c line=110 column=77
w
, "Prefer")) {
121        if : true=0, false=0
i
f (n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority & : pass=0
&
 FLP_NONE) {
122            return : pass=0
r
eturn "Cannot combine ForceLanguagePriority options None and "
123                   "Prefer";
124        }
125        n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority |= : enter=0, leave=0
|
= FLP_PREFER;
126    }
127    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(w : modules/mappers/mod_negotiation.c line=110 column=77
w
, "Fallback")) {
128        if : true=0, false=0
i
f (n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority & : pass=0
&
 FLP_NONE) {
129            return : pass=0
r
eturn "Cannot combine ForceLanguagePriority options None and "
130                   "Fallback";
131        }
132        n : modules/mappers/mod_negotiation.c line=112 column=21
n
-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority |= : enter=0, leave=0
|
= FLP_FALLBACK;
133    }
134    else {
135        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_negotiation.c line=110 column=50
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Invalid ForceLanguagePriority option ",
136                           w : modules/mappers/mod_negotiation.c line=110 column=77
w
, NULL);
137    }
138
139    return : pass=0
r
eturn NULL;
140}
141
142static const char *cache_negotiated_docs : call=0
c
ache_negotiated_docs(cmd_parms *cmd, void *dummy,
143                                         int arg)
144{
145    ap_set_module_config(cmd : modules/mappers/mod_negotiation.c line=142 column=53
c
md-> : enter=0, leave=0
-
>server : include/http_config.h line=296 column=17
s
erver-> : enter=0, leave=0
-
>module_config : include/httpd.h line=1207 column=30
m
odule_config, &negotiation_module : modules/mappers/mod_negotiation.c line=67 column=31
n
egotiation_module,
146                         (arg : modules/mappers/mod_negotiation.c line=143 column=46
a
rg conditional operator : true=0, false=0
?
 "Cache" : NULL));
147    return : pass=0
r
eturn NULL;
148}
149
150static int do_cache_negotiated_docs : call=0
d
o_cache_negotiated_docs(server_rec *s)
151{
152    return : pass=0
r
eturn (ap_get_module_config(s : modules/mappers/mod_negotiation.c line=150 column=49
s
-> : enter=0, leave=0
-
>module_config : include/httpd.h line=1207 column=30
m
odule_config,
153                                 &negotiation_module : modules/mappers/mod_negotiation.c line=67 column=31
n
egotiation_module) != : true=0, false=0
!
= NULL);
154}
155
156static const command_rec negotiation_cmds[] =
157{
158    AP_INIT_FLAG("CacheNegotiatedDocs", cache_negotiated_docs : modules/mappers/mod_negotiation.c line=142 column=20
c
ache_negotiated_docs, NULL, RSRC_CONF,
159                 "Either 'on' or 'off' (default)"),
160    AP_INIT_ITERATE("LanguagePriority", set_language_priority : modules/mappers/mod_negotiation.c line=96 column=20
s
et_language_priority, NULL,
161                    OR_FILEINFO,
162                    "space-delimited list of MIME language abbreviations"),
163    AP_INIT_ITERATE("ForceLanguagePriority", set_force_priority : modules/mappers/mod_negotiation.c line=110 column=20
s
et_force_priority, NULL,
164                    OR_FILEINFO,
165                    "Force LanguagePriority elections, either None, or "
166                    "Fallback and/or Prefer"),
167    {NULL}
168};
169
170/*
171 * Record of available info on a media type specified by the client
172 * (we also use 'em for encodings and languages)
173 */
174
175typedef struct accept_rec {
176    char *name;                 /* MUST be lowercase */
177    float quality;
178    float level;
179    char *charset;              /* for content-type only */
180} accept_rec;
181
182/*
183 * Record of available info on a particular variant
184 *
185 * Note that a few of these fields are updated by the actual negotiation
186 * code.  These are:
187 *
188 * level_matched --- initialized to zero.  Set to the value of level
189 *             if the client actually accepts this media type at that
190 *             level (and *not* if it got in on a wildcard).  See level_cmp
191 *             below.
192 * mime_stars -- initialized to zero.  Set to the number of stars
193 *               present in the best matching Accept header element.
194 *               1 for star/star, 2 for type/star and 3 for
195 *               type/subtype.
196 *
197 * definite -- initialized to 1.  Set to 0 if there is a match which
198 *             makes the variant non-definite according to the rules
199 *             in rfc2296.
200 */
201
202typedef struct var_rec {
203    request_rec *sub_req;       /* May be NULL (is, for map files) */
204    const char *mime_type;      /* MUST be lowercase */
205    const char *file_name;      /* Set to 'this' (for map file body content) */
206    apr_off_t body;             /* Only for map file body content */
207    const char *content_encoding;
208    apr_array_header_t *content_languages; /* list of lang. for this variant */
209    const char *content_charset;
210    const char *description;
211
212    /* The next five items give the quality values for the dimensions
213     * of negotiation for this variant. They are obtained from the
214     * appropriate header lines, except for source_quality, which
215     * is obtained from the variant itself (the 'qs' parameter value
216     * from the variant's mime-type). Apart from source_quality,
217     * these values are set when we find the quality for each variant
218     * (see best_match()). source_quality is set from the 'qs' parameter
219     * of the variant description or mime type: see set_mime_fields().
220     */
221    float lang_quality;         /* quality of this variant's language */
222    float encoding_quality;     /* ditto encoding */
223    float charset_quality;      /* ditto charset */
224    float mime_type_quality;    /* ditto media type */
225    float source_quality;       /* source quality for this variant */
226
227    /* Now some special values */
228    float level;                /* Auxiliary to content-type... */
229    apr_off_t bytes;            /* content length, if known */
230    int lang_index;             /* Index into LanguagePriority list */
231    int is_pseudo_html;         /* text/html, *or* the INCLUDES_MAGIC_TYPEs */
232
233    /* Above are all written-once properties of the variant.  The
234     * three fields below are changed during negotiation:
235     */
236
237    float level_matched;
238    int mime_stars;
239    int definite;
240} var_rec;
241
242/* Something to carry around the state of negotiation (and to keep
243 * all of this thread-safe)...
244 */
245
246typedef struct {
247    apr_pool_t *pool;
248    request_rec *r;
249    neg_dir_config *conf;
250    char *dir_name;
251    int accept_q;               /* 1 if an Accept item has a q= param */
252    float default_lang_quality; /* fiddle lang q for variants with no lang */
253
254    /* the array pointers below are NULL if the corresponding accept
255     * headers are not present
256     */
257    apr_array_header_t *accepts;            /* accept_recs */
258    apr_array_header_t *accept_encodings;   /* accept_recs */
259    apr_array_header_t *accept_charsets;    /* accept_recs */
260    apr_array_header_t *accept_langs;       /* accept_recs */
261
262    apr_array_header_t *avail_vars;         /* available variants */
263
264    int count_multiviews_variants;    /* number of variants found on disk */
265
266    int is_transparent;       /* 1 if this resource is trans. negotiable */
267
268    int dont_fiddle_headers;  /* 1 if we may not fiddle with accept hdrs */
269    int ua_supports_trans;    /* 1 if ua supports trans negotiation */
270    int send_alternates;      /* 1 if we want to send an Alternates header */
271    int may_choose;           /* 1 if we may choose a variant for the client */
272    int use_rvsa;             /* 1 if we must use RVSA/1.0 negotiation algo */
273} negotiation_state;
274
275/* A few functions to manipulate var_recs.
276 * Cleaning out the fields...
277 */
278
279static void clean_var_rec : call=0
c
lean_var_rec(var_rec *mime_info)
280{
281    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req = : enter=0, leave=0
=
 NULL;
282    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type = : enter=0, leave=0
=
 "";
283    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name = : enter=0, leave=0
=
 "";
284    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>body : modules/mappers/mod_negotiation.c line=206 column=15
b
ody = : enter=0, leave=0
=
 0;
285    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding = : enter=0, leave=0
=
 NULL;
286    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages = : enter=0, leave=0
=
 NULL;
287    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset = : enter=0, leave=0
=
 "";
288    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>description : modules/mappers/mod_negotiation.c line=210 column=17
d
escription = : enter=0, leave=0
=
 "";
289
290    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>is_pseudo_html : modules/mappers/mod_negotiation.c line=231 column=9
i
s_pseudo_html = : enter=0, leave=0
=
 0;
291    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel = : enter=0, leave=0
=
 0.0f;
292    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched = : enter=0, leave=0
=
 0.0f;
293    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes = : enter=0, leave=0
=
 -1;
294    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index = : enter=0, leave=0
=
 -1;
295    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars = : enter=0, leave=0
=
 0;
296    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 1;
297
298    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality = : enter=0, leave=0
=
 1.0f;
299    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 1.0f;
300    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality = : enter=0, leave=0
=
 1.0f;
301    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>mime_type_quality : modules/mappers/mod_negotiation.c line=224 column=11
m
ime_type_quality = : enter=0, leave=0
=
 1.0f;
302    mime_info : modules/mappers/mod_negotiation.c line=279 column=36
m
ime_info-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality = : enter=0, leave=0
=
 0.0f;
303}
304
305/* Initializing the relevant fields of a variant record from the
306 * accept_info read out of its content-type, one way or another.
307 */
308
309static void set_mime_fields : call=0
s
et_mime_fields(var_rec *var, accept_rec *mime_info)
310{
311    var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type = : enter=0, leave=0
=
 mime_info : modules/mappers/mod_negotiation.c line=309 column=55
m
ime_info-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame;
312    var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality = : enter=0, leave=0
=
 mime_info : modules/mappers/mod_negotiation.c line=309 column=55
m
ime_info-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
313    var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel = : enter=0, leave=0
=
 mime_info : modules/mappers/mod_negotiation.c line=309 column=55
m
ime_info-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel;
314    var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset = : enter=0, leave=0
=
 mime_info : modules/mappers/mod_negotiation.c line=309 column=55
m
ime_info-> : enter=0, leave=0
-
>charset : modules/mappers/mod_negotiation.c line=179 column=11
c
harset;
315
316    var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>is_pseudo_html : modules/mappers/mod_negotiation.c line=231 column=9
i
s_pseudo_html = : enter=0, leave=0
=
 (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, "text/html")
317                           || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, INCLUDES_MAGIC_TYPE)
318                           || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(var : modules/mappers/mod_negotiation.c line=309 column=38
v
ar-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, INCLUDES_MAGIC_TYPE3));
319}
320
321/* Create a variant list validator in r using info from vlistr. */
322
323static void set_vlist_validator : call=0
s
et_vlist_validator(request_rec *r, request_rec *vlistr)
324{
325    /* Calculating the variant list validator is similar to
326     * calculating an etag for the source of the variant list
327     * information, so we use ap_make_etag().  Note that this
328     * validator can be 'weak' in extreme case.
329     */
330    ap_update_mtime : enter=0, leave=0

ap_update_mtime : include/http_request.h line=198 column=18
a
p_update_mtime(vlistr : modules/mappers/mod_negotiation.c line=323 column=62
v
listr, vlistr : modules/mappers/mod_negotiation.c line=323 column=62
v
listr-> : enter=0, leave=0
-
>finfo : include/httpd.h line=957 column=17
f
info.mtime : /usr/include/apr-1/apr_file_info.h line=204 column=16 mtime);
331    r : modules/mappers/mod_negotiation.c line=323 column=46
r
-> : enter=0, leave=0
-
>vlist_validator : include/httpd.h line=927 column=11
v
list_validator = : enter=0, leave=0
=
 ap_make_etag : enter=0, leave=0

ap_make_etag : include/http_protocol.h line=159 column=20
a
p_make_etag(vlistr : modules/mappers/mod_negotiation.c line=323 column=62
v
listr, 0);
332
333    /* ap_set_etag will later take r->vlist_validator into account
334     * when creating the etag header
335     */
336}
337
338
339/*****************************************************************
340 *
341 * Parsing (lists of) media types and their parameters, as seen in
342 * HTTPD header lines and elsewhere.
343 */
344
345/*
346 * parse quality value. atof(3) is not well-usable here, because it
347 * depends on the locale (argh).
348 *
349 * However, RFC 2616 states:
350 * 3.9 Quality Values
351 *
352 * [...] HTTP/1.1 applications MUST NOT generate more than three digits
353 * after the decimal point. User configuration of these values SHOULD also
354 * be limited in this fashion.
355 *
356 *     qvalue         = ( "0" [ "." 0*3DIGIT ] )
357 *                    | ( "1" [ "." 0*3("0") ] )
358 *
359 * This is quite easy. If the supplied string doesn't match the above
360 * definition (loosely), we simply return 1 (same as if there's no qvalue)
361 */
362
363static float atoq : call=0
a
toq(const char *string)
364{
365    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring) {
366        return : pass=0
r
eturn  1.0f;
367    }
368
369    while : true=0, false=0
w
hile (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring && : true=0, false=0
&
& apr_isspace(* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring)) {
370        ++ : pass=0
+
+string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring;
371    }
372
373    /* be tolerant and accept qvalues without leading zero
374     * (also for backwards compat, where atof() was in use)
375     */
376    if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '.' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring++ : pass=0
+
!= : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '0') {
377        return : pass=0
r
eturn 1.0f;
378    }
379
380    if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring == : true=0, false=0
=
= '.') {
381        /* better only one division later, than dealing with fscking
382         * IEEE format 0.1 factors ...
383         */
384        int i = 0;
385
386        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
++ : pass=0
+
+string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= '0' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring <= : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
= '9') {
387            i : modules/mappers/mod_negotiation.c line=384 column=13
i
 += : pass=0
+
= (* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring - : pass=0
-
 '0') * : pass=0
*
 100;
388
389            if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
++ : pass=0
+
+string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= '0' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring <= : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
= '9') {
390                i : modules/mappers/mod_negotiation.c line=384 column=13
i
 += : pass=0
+
= (* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring - : pass=0
-
 '0') * : pass=0
*
 10;
391
392                if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
++ : pass=0
+
+string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 '0' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring <= : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
= '9') {
393                    i : modules/mappers/mod_negotiation.c line=384 column=13
i
 += : pass=0
+
= (* dereference : enter=0, leave=0
*
string : modules/mappers/mod_negotiation.c line=363 column=31
s
tring - : pass=0
-
 '0');
394                }
395            }
396        }
397
398        return : pass=0
r
eturn (float)i : modules/mappers/mod_negotiation.c line=384 column=13
i
 / : pass=0
/
 1000.0f;
399    }
400
401    return : pass=0
r
eturn 0.0f;
402}
403
404/*
405 * Get a single mime type entry --- one media type and parameters;
406 * enter the values we recognize into the argument accept_rec
407 */
408
409static const char *get_entry : call=0
g
et_entry(apr_pool_t *p, accept_rec *result,
410                             const char *accept_line)
411{
412    result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality = : enter=0, leave=0
=
 1.0f;
413    result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 0.0f;
414    result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>charset : modules/mappers/mod_negotiation.c line=179 column=11
c
harset = : enter=0, leave=0
=
 "";
415
416    /*
417     * Note that this handles what I gather is the "old format",
418     *
419     *    Accept: text/html text/plain moo/zot
420     *
421     * without any compatibility kludges --- if the token after the
422     * MIME type begins with a semicolon, we know we're looking at parms,
423     * otherwise, we know we aren't.  (So why all the pissing and moaning
424     * in the CERN server code?  I must be missing something).
425     */
426
427    result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame = : enter=0, leave=0
=
 ap_get_token : enter=0, leave=0

ap_get_token : include/httpd.h line=1423 column=20
a
p_get_token(p : modules/mappers/mod_negotiation.c line=409 column=42
p
, &accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line, 0);
428    ap_str_tolower : enter=0, leave=0

ap_str_tolower : include/httpd.h line=1739 column=18
a
p_str_tolower(result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame);     /* You want case insensitive,
429                                       * you'll *get* case insensitive.
430                                       */
431
432    /* KLUDGE!!! Default HTML to level 2.0 unless the browser
433     * *explicitly* says something else.
434     */
435
436    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, "text/html") && : true=0, false=0
&
& (result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0)) {
437        result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 2.0f;
438    }
439    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, INCLUDES_MAGIC_TYPE)) {
440        result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 2.0f;
441    }
442    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, INCLUDES_MAGIC_TYPE3)) {
443        result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 3.0f;
444    }
445
446    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line == : true=0, false=0
=
= ';') {
447        /* Parameters ... */
448
449        char *parm;
450        char *cp;
451        char *end;
452
453        ++ : pass=0
+
+accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line;
454        parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm = : pass=0
=
 ap_get_token : enter=0, leave=0

ap_get_token : include/httpd.h line=1423 column=20
a
p_get_token(p : modules/mappers/mod_negotiation.c line=409 column=42
p
, &accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line, 1);
455
456        /* Look for 'var = value' --- and make sure the var is in lcase. */
457
458        for : true=0, false=0
f
or (cp : modules/mappers/mod_negotiation.c line=450 column=15
c
= : pass=0
=
 parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm; (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
&& : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
apr_isspace(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p) && : true=0, false=0
&
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
!= : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '='); ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p) {
459            *cp : modules/mappers/mod_negotiation.c line=450 column=15
c
= : enter=0, leave=0
=
 apr_tolower(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p);
460        }
461
462        if : true=0, false=0
i
f (! : true=0, false=0
!
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p) {
463            continue : pass=0
c
ontinue;           /* No '='; just ignore it. */
464        }
465
466        *cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p++ : pass=0
+
= : enter=0, leave=0
=
 '\0';           /* Delimit var */
467        while : true=0, false=0
w
hile (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
&& : true=0, false=0
&
& (apr_isspace(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p) || : true=0, false=0
|
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
== : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '=')) {
468            ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p;
469        }
470
471        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=450 column=15
c
== : true=0, false=0
=
= '"') {
472            ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p;
473            for : true=0, false=0
f
or (end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd = : pass=0
=
 cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p;
474                 (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd && : true=0, false=0
&
* dereference : enter=0, leave=0
*
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\n' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\r' && : true=0, false=0
&
* dereference : enter=0, leave=0
*
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\"');
475                 end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd++ : pass=0
+
+);
476        }
477        else {
478            for : true=0, false=0
f
or (end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd = : pass=0
=
 cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p; (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
apr_isspace(* dereference : enter=0, leave=0
*
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd)); end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd++ : pass=0
+
+);
479        }
480        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd) {
481            *end : modules/mappers/mod_negotiation.c line=451 column=15
e
nd = : enter=0, leave=0
=
 '\0';        /* strip ending quote or return */
482        }
483        ap_str_tolower : enter=0, leave=0

ap_str_tolower : include/httpd.h line=1739 column=18
a
p_str_tolower(cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p);
484
485        if : true=0, false=0
i
f (parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'q'
486            && : true=0, false=0
&
& (parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '\0' || : true=0, false=0
|
| (parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 's' && : true=0, false=0
&
parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
2] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '\0'))) {
487            result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality = : enter=0, leave=0
=
 atoq : enter=0, leave=0

atoq : modules/mappers/mod_negotiation.c line=363 column=14
a
toq(cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p);
488        }
489        else if : true=0, false=0
i
f (parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'l' && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(&parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm[] : enter=0, leave=0
[
1], "evel")) {
490            result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 (float)atoi : enter=0, leave=0

atoi : /usr/include/stdlib.h line=148 column=12
a
toi(cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p);
491        }
492        else if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(parm : modules/mappers/mod_negotiation.c line=449 column=15
p
arm, "charset")) {
493            result : modules/mappers/mod_negotiation.c line=409 column=57
r
esult-> : enter=0, leave=0
-
>charset : modules/mappers/mod_negotiation.c line=179 column=11
c
harset = : enter=0, leave=0
=
 cp : modules/mappers/mod_negotiation.c line=450 column=15
c
p;
494        }
495    }
496
497    if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line == : true=0, false=0
=
= ',') {
498        ++ : pass=0
+
+accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line;
499    }
500
501    return : pass=0
r
eturn accept_line : modules/mappers/mod_negotiation.c line=410 column=42
a
ccept_line;
502}
503
504/*****************************************************************
505 *
506 * Dealing with header lines ...
507 *
508 * Accept, Accept-Charset, Accept-Language and Accept-Encoding
509 * are handled by do_header_line() - they all have the same
510 * basic structure of a list of items of the format
511 *    name; q=N; charset=TEXT
512 *
513 * where charset is only valid in Accept.
514 */
515
516static apr_array_header_t *do_header_line : call=0
d
o_header_line(apr_pool_t *p,
517                                          const char *accept_line)
518{
519    apr_array_header_t *accept_recs;
520
521    if : true=0, false=0
i
f (! : true=0, false=0
!
accept_line : modules/mappers/mod_negotiation.c line=517 column=55
a
ccept_line) {
522        return : pass=0
r
eturn NULL;
523    }
524
525    accept_recs : modules/mappers/mod_negotiation.c line=519 column=25
a
ccept_recs = : pass=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(p : modules/mappers/mod_negotiation.c line=516 column=55
p
, 40, sizeof(accept_rec));
526
527    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
accept_line : modules/mappers/mod_negotiation.c line=517 column=55
a
ccept_line) {
528        accept_rec *new = (accept_rec *) 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(accept_recs : modules/mappers/mod_negotiation.c line=519 column=25
a
ccept_recs);
529        accept_line : modules/mappers/mod_negotiation.c line=517 column=55
a
ccept_line = : pass=0
=
 get_entry : enter=0, leave=0

get_entry : modules/mappers/mod_negotiation.c line=409 column=20
g
et_entry(p : modules/mappers/mod_negotiation.c line=516 column=55
p
new : modules/mappers/mod_negotiation.c line=528 column=21
n
ew, accept_line : modules/mappers/mod_negotiation.c line=517 column=55
a
ccept_line);
530    }
531
532    return : pass=0
r
eturn accept_recs : modules/mappers/mod_negotiation.c line=519 column=25
a
ccept_recs;
533}
534
535/* Given the text of the Content-Languages: line from the var map file,
536 * return an array containing the languages of this variant
537 */
538
539static apr_array_header_t *do_languages_line : call=0
d
o_languages_line(apr_pool_t *p,
540                                             const char **lang_line)
541{
542    apr_array_header_t *lang_recs = 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(p : modules/mappers/mod_negotiation.c line=539 column=58
p
, 2, sizeof(char *));
543
544    if : true=0, false=0
i
f (! : true=0, false=0
!
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line) {
545        return : pass=0
r
eturn lang_recs : modules/mappers/mod_negotiation.c line=542 column=25
l
ang_recs;
546    }
547
548    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
* dereference : enter=0, leave=0
*
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line) {
549        char **new = (char **) 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(lang_recs : modules/mappers/mod_negotiation.c line=542 column=25
l
ang_recs);
550        *new : modules/mappers/mod_negotiation.c line=549 column=16
n
ew = : enter=0, leave=0
=
 ap_get_token : enter=0, leave=0

ap_get_token : include/httpd.h line=1423 column=20
a
p_get_token(p : modules/mappers/mod_negotiation.c line=539 column=58
p
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line, 0);
551        ap_str_tolower : enter=0, leave=0

ap_str_tolower : include/httpd.h line=1739 column=18
a
p_str_tolower(* dereference : enter=0, leave=0
*
new : modules/mappers/mod_negotiation.c line=549 column=16
n
ew);
552        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
* dereference : enter=0, leave=0
*
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= ',' || : true=0, false=0
|
* dereference : enter=0, leave=0
*
* dereference : enter=0, leave=0
*
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= ';') {
553            ++ : pass=0
+
+(* dereference : enter=0, leave=0
*
lang_line : modules/mappers/mod_negotiation.c line=540 column=59
l
ang_line);
554        }
555    }
556
557    return : pass=0
r
eturn lang_recs : modules/mappers/mod_negotiation.c line=542 column=25
l
ang_recs;
558}
559
560/*****************************************************************
561 *
562 * Handling header lines from clients...
563 */
564
565static negotiation_state *parse_accept_headers : call=0
p
arse_accept_headers(request_rec *r)
566{
567    negotiation_state *new =
568        (negotiation_state *) apr_pcalloc(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, sizeof(negotiation_state));
569    accept_rec *elts;
570    apr_table_t *hdrs = r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in;
571    int i;
572
573    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool = : enter=0, leave=0
=
 r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool;
574    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
 = : enter=0, leave=0
=
 r : modules/mappers/mod_negotiation.c line=565 column=61
r
;
575    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>conf : modules/mappers/mod_negotiation.c line=249 column=21
c
onf = : enter=0, leave=0
=
 (neg_dir_config *)ap_get_module_config(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>per_dir_config : include/httpd.h line=977 column=30
p
er_dir_config,
576                                                       &negotiation_module : modules/mappers/mod_negotiation.c line=67 column=31
n
egotiation_module);
577
578    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>dir_name : modules/mappers/mod_negotiation.c line=250 column=11
d
ir_name = : enter=0, leave=0
=
 ap_make_dirstr_parent : enter=0, leave=0

ap_make_dirstr_parent : include/httpd.h line=1586 column=20
a
p_make_dirstr_parent(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
579
580    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts = : enter=0, leave=0
=
 do_header_line : enter=0, leave=0

do_header_line : modules/mappers/mod_negotiation.c line=516 column=28
d
o_header_line(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 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(hdrs : modules/mappers/mod_negotiation.c line=570 column=18
h
drs, "Accept"));
581
582    /* calculate new->accept_q value */
583    if : true=0, false=0
i
f (new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts) {
584        elts : modules/mappers/mod_negotiation.c line=569 column=17
e
lts = : pass=0
=
 (accept_rec *) new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
585
586        for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=571 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=571 column=9
i
 < : true=0, false=0
<
 new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=571 column=9
i
) {
587            if : true=0, false=0
i
f (elts : modules/mappers/mod_negotiation.c line=569 column=17
e
lts[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=571 column=9
i
].quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality < : true=0, false=0
<
 1.0) {
588                new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accept_q : modules/mappers/mod_negotiation.c line=251 column=9
a
ccept_q = : enter=0, leave=0
=
 1;
589            }
590        }
591    }
592
593    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accept_encodings : modules/mappers/mod_negotiation.c line=258 column=25
a
ccept_encodings = : enter=0, leave=0
=
594        do_header_line : enter=0, leave=0

do_header_line : modules/mappers/mod_negotiation.c line=516 column=28
d
o_header_line(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 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(hdrs : modules/mappers/mod_negotiation.c line=570 column=18
h
drs, "Accept-Encoding"));
595    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accept_langs : modules/mappers/mod_negotiation.c line=260 column=25
a
ccept_langs = : enter=0, leave=0
=
596        do_header_line : enter=0, leave=0

do_header_line : modules/mappers/mod_negotiation.c line=516 column=28
d
o_header_line(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 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(hdrs : modules/mappers/mod_negotiation.c line=570 column=18
h
drs, "Accept-Language"));
597    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>accept_charsets : modules/mappers/mod_negotiation.c line=259 column=25
a
ccept_charsets = : enter=0, leave=0
=
598        do_header_line : enter=0, leave=0

do_header_line : modules/mappers/mod_negotiation.c line=516 column=28
d
o_header_line(r : modules/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 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(hdrs : modules/mappers/mod_negotiation.c line=570 column=18
h
drs, "Accept-Charset"));
599
600    /* This is possibly overkill for some servers, heck, we have
601     * only 33 index.html variants in docs/docroot (today).
602     * Make this configurable?
603     */
604    new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars = : 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/mappers/mod_negotiation.c line=565 column=61
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 40, sizeof(var_rec));
605
606    return : pass=0
r
eturn new : modules/mappers/mod_negotiation.c line=567 column=24
n
ew;
607}
608
609
610static void parse_negotiate_header : call=0
p
arse_negotiate_header(request_rec *r, negotiation_state *neg)
611{
612    const char *negotiate = 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/mappers/mod_negotiation.c line=610 column=49
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "Negotiate");
613    char *tok;
614
615    /* First, default to no TCN, no Alternates, and the original Apache
616     * negotiation algorithm with fiddles for broken browser configs.
617     *
618     * To save network bandwidth, we do not configure to send an
619     * Alternates header to the user agent by default.  User
620     * agents that want an Alternates header for agent-driven
621     * negotiation will have to request it by sending an
622     * appropriate Negotiate header.
623     */
624    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>ua_supports_trans : modules/mappers/mod_negotiation.c line=269 column=9
u
a_supports_trans   = : enter=0, leave=0
=
 0;
625    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates     = : enter=0, leave=0
=
 0;
626    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose          = : enter=0, leave=0
=
 1;
627    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>use_rvsa : modules/mappers/mod_negotiation.c line=272 column=9
u
se_rvsa            = : enter=0, leave=0
=
 0;
628    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers = : enter=0, leave=0
=
 0;
629
630    if : true=0, false=0
i
f (! : true=0, false=0
!
negotiate : modules/mappers/mod_negotiation.c line=612 column=17
n
egotiate)
631        return : pass=0
r
eturn;
632
633    if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(negotiate : modules/mappers/mod_negotiation.c line=612 column=17
n
egotiate, "trans") == : true=0, false=0
=
= 0) {
634        /* Lynx 2.7 and 2.8 send 'negotiate: trans' even though they
635         * do not support transparent content negotiation, so for Lynx we
636         * ignore the negotiate header when its contents are exactly "trans".
637         * If future versions of Lynx ever need to say 'negotiate: trans',
638         * they can send the equivalent 'negotiate: trans, trans' instead
639         * to avoid triggering the workaround below.
640         */
641        const char *ua = 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/mappers/mod_negotiation.c line=610 column=49
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "User-Agent");
642
643        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

ua : modules/mappers/mod_negotiation.c line=641 column=21
uTF
&& : true=0, false=0
&
& (strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(ua : modules/mappers/mod_negotiation.c line=641 column=21
u
a, "Lynx", 4) == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0))
644            return : pass=0
r
eturn;
645    }
646
647    neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose = : enter=0, leave=0
=
 0;  /* An empty Negotiate would require 300 response */
648
649    while : true=0, false=0
w
hile ((tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok = : pass=0
=
 ap_get_list_item : enter=0, leave=0

ap_get_list_item : include/httpd.h line=1401 column=20
a
p_get_list_item(neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, &negotiate : modules/mappers/mod_negotiation.c line=612 column=17
n
egotiate)) != : true=0, false=0
!
= NULL) {
650
651        if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok, "trans") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0 || : true=0, false=0
|
|
652            strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok, "vlist") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0 || : true=0, false=0
|
|
653            strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok, "guess-small") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0 || : true=0, false=0
|
|
654            apr_isdigit(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok[] : enter=0, leave=0
[
0]) || : true=0, false=0
|
|
655            strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok, "*") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0) {
656
657            /* The user agent supports transparent negotiation */
658            neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>ua_supports_trans : modules/mappers/mod_negotiation.c line=269 column=9
u
a_supports_trans = : enter=0, leave=0
=
 1;
659
660            /* Send-alternates could be configurable, but note
661             * that it must be 1 if we have 'vlist' in the
662             * negotiate header.
663             */
664            neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates = : enter=0, leave=0
=
 1;
665
666            if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok, "1.0") == : true=0, false=0
=
= 0) {
667                /* we may use the RVSA/1.0 algorithm, configure for it */
668                neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose = : enter=0, leave=0
=
 1;
669                neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>use_rvsa : modules/mappers/mod_negotiation.c line=272 column=9
u
se_rvsa = : enter=0, leave=0
=
 1;
670                neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers = : enter=0, leave=0
=
 1;
671            }
672            else if : true=0, false=0
i
f (tok : modules/mappers/mod_negotiation.c line=613 column=11
t
ok[] : enter=0, leave=0
[
0] == : true=0, false=0
=
= '*') {
673                /* we may use any variant selection algorithm, configure
674                 * to use the Apache algorithm
675                 */
676                neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose = : enter=0, leave=0
=
 1;
677
678                /* We disable header fiddles on the assumption that a
679                 * client sending Negotiate knows how to send correct
680                 * headers which don't need fiddling.
681                 */
682                neg : modules/mappers/mod_negotiation.c line=610 column=71
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers = : enter=0, leave=0
=
 1;
683            }
684        }
685    }
686
687#ifdef NEG_DEBUG
688    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
689            "dont_fiddle_headers=%d use_rvsa=%d ua_supports_trans=%d "
690            "send_alternates=%d, may_choose=%d",
691            neg->dont_fiddle_headers, neg->use_rvsa,
692            neg->ua_supports_trans, neg->send_alternates, neg->may_choose);
693#endif
694
695}
696
697/* Sometimes clients will give us no Accept info at all; this routine sets
698 * up the standard default for that case, and also arranges for us to be
699 * willing to run a CGI script if we find one.  (In fact, we set up to
700 * dramatically prefer CGI scripts in cases where that's appropriate,
701 * e.g., POST or when URI includes query args or extra path info).
702 */
703static void maybe_add_default_accepts : call=0
m
aybe_add_default_accepts(negotiation_state *neg,
704                                      int prefer_scripts)
705{
706    accept_rec *new_accept;
707
708    if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts) {
709        neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts = : 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(neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, 4, sizeof(accept_rec));
710
711        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept = : pass=0
=
 (accept_rec *) 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(neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts);
712
713        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame = : enter=0, leave=0
=
 "*/*";
714        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality = : enter=0, leave=0
=
 1.0f;
715        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 0.0f;
716    }
717
718    new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept = : pass=0
=
 (accept_rec *) 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(neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts);
719
720    new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame = : enter=0, leave=0
=
 CGI_MAGIC_TYPE;
721    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=703 column=58
n
eg-> : enter=0, leave=0
-
>use_rvsa : modules/mappers/mod_negotiation.c line=272 column=9
u
se_rvsa) {
722        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality = : enter=0, leave=0
=
 0;
723    }
724    else {
725        new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality = : enter=0, leave=0
=
 prefer_scripts : modules/mappers/mod_negotiation.c line=704 column=43
p
refer_scripts conditional operator : true=0, false=0
?
 2.0f : 0.001f;
726    }
727    new_accept : modules/mappers/mod_negotiation.c line=706 column=17
n
ew_accept-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel = : enter=0, leave=0
=
 0.0f;
728}
729
730/*****************************************************************
731 *
732 * Parsing type-map files, in Roy's meta/http format augmented with
733 * #-comments.
734 */
735
736/* Reading RFC822-style header lines, ignoring #-comments and
737 * handling continuations.
738 */
739
740enum header_state {
741    header_eof, header_seen, header_sep
742};
743
744static enum header_state get_header_line : call=0
g
et_header_line(char *buffer, int len, apr_file_t *map)
745{
746    char *buf_end = buffer : modules/mappers/mod_negotiation.c line=744 column=48
b
uffer + : pass=0
+
 len : modules/mappers/mod_negotiation.c line=744 column=60
l
en;
747    char *cp;
748    char c;
749
750    /* Get a noncommented line */
751
752    do {
753        if : true=0, false=0
i
f (apr_file_gets : enter=0, leave=0

apr_file_gets : /usr/include/apr-1/apr_file_io.h line=542 column=27
a
pr_file_gets(buffer : modules/mappers/mod_negotiation.c line=744 column=48
b
uffer, MAX_STRING_LEN, map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap) != : true=0, false=0
!
= APR_SUCCESS) {
754            return : pass=0
r
eturn header_eof : modules/mappers/mod_negotiation.c line=741 column=5
h
eader_eof;
755        }
756    } while : true=0, false=0
w
hile (buffer : modules/mappers/mod_negotiation.c line=744 column=48
b
uffer[] : enter=0, leave=0
[
0] == : true=0, false=0
=
= '#');
757
758    /* If blank, just return it --- this ends information on this variant */
759
760    for : true=0, false=0
f
or (cp : modules/mappers/mod_negotiation.c line=747 column=11
c
= : pass=0
=
 buffer : modules/mappers/mod_negotiation.c line=744 column=48
b
uffer; (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
cp : modules/mappers/mod_negotiation.c line=747 column=11
c
&& : true=0, false=0
&
& apr_isspace(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=747 column=11
c
p)); ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=747 column=11
c
p) {
761        continue : pass=0
c
ontinue;
762    }
763
764    if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=747 column=11
c
== : true=0, false=0
=
= '\0') {
765        return : pass=0
r
eturn header_sep : modules/mappers/mod_negotiation.c line=741 column=30
h
eader_sep;
766    }
767
768    /* If non-blank, go looking for header lines, but note that we still
769     * have to treat comments specially...
770     */
771
772    cp : modules/mappers/mod_negotiation.c line=747 column=11
c
+= : pass=0
+
strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(cp : modules/mappers/mod_negotiation.c line=747 column=11
c
p);
773
774    /* We need to shortcut the rest of this block following the Body:
775     * tag - we will not look for continutation after this line.
776     */
777    if : true=0, false=0
i
f (! : true=0, false=0
!
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
s
trncasecmp(buffer : modules/mappers/mod_negotiation.c line=744 column=48
b
uffer, "Body:", 5))
778        return : pass=0
r
eturn header_seen : modules/mappers/mod_negotiation.c line=741 column=17
h
eader_seen;
779
780    while : true=0, false=0
w
hile (apr_file_getc : enter=0, leave=0

apr_file_getc : /usr/include/apr-1/apr_file_io.h line=526 column=27
a
pr_file_getc(&c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap) != : true=0, false=0
!
= APR_EOF) {
781        if : true=0, false=0
i
f (c : modules/mappers/mod_negotiation.c line=748 column=10
c
 == : true=0, false=0
=
= '#') {
782            /* Comment line */
783            while : true=0, false=0
w
hile (apr_file_getc : enter=0, leave=0

apr_file_getc : /usr/include/apr-1/apr_file_io.h line=526 column=27
a
pr_file_getc(&c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap) != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= APR_EOF && : true=0, false=0
&
c : modules/mappers/mod_negotiation.c line=748 column=10
c
 != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\n') {
784                continue : pass=0
c
ontinue;
785            }
786        }
787        else if : true=0, false=0
i
f (apr_isspace(c : modules/mappers/mod_negotiation.c line=748 column=10
c
)) {
788            /* Leading whitespace.  POSSIBLE continuation line
789             * Also, possibly blank --- if so, we ungetc() the final newline
790             * so that we will pick up the blank line the next time 'round.
791             */
792
793            while : true=0, false=0
w
hile (c : modules/mappers/mod_negotiation.c line=748 column=10
c
 != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\n' && : true=0, false=0
&
& apr_isspace(c : modules/mappers/mod_negotiation.c line=748 column=10
c
)) {
794                if : true=0, false=0
i
f(apr_file_getc : enter=0, leave=0

apr_file_getc : /usr/include/apr-1/apr_file_io.h line=526 column=27
a
pr_file_getc(&c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap) != : true=0, false=0
!
= APR_SUCCESS)
795                    break : pass=0
b
reak;
796            }
797
798            apr_file_ungetc : enter=0, leave=0

apr_file_ungetc : /usr/include/apr-1/apr_file_io.h line=533 column=27
a
pr_file_ungetc(c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap);
799
800            if : true=0, false=0
i
f (c : modules/mappers/mod_negotiation.c line=748 column=10
c
 == : true=0, false=0
=
= '\n') {
801                return : pass=0
r
eturn header_seen : modules/mappers/mod_negotiation.c line=741 column=17
h
eader_seen;     /* Blank line */
802            }
803
804            /* Continuation */
805
806            while : true=0, false=0
w
hile (   cp : modules/mappers/mod_negotiation.c line=747 column=11
c
< : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 buf_end : modules/mappers/mod_negotiation.c line=746 column=11
b
uf_end - : pass=0
-
 2
807                   && : true=0, false=0
&
& (apr_file_getc : enter=0, leave=0

apr_file_getc : /usr/include/apr-1/apr_file_io.h line=526 column=27
a
pr_file_getc(&c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap)) != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= APR_EOF
808                   && : true=0, false=0
&
c : modules/mappers/mod_negotiation.c line=748 column=10
c
 != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\n') {
809                *cp : modules/mappers/mod_negotiation.c line=747 column=11
c
p++ : pass=0
+
= : enter=0, leave=0
=
 c : modules/mappers/mod_negotiation.c line=748 column=10
c
;
810            }
811
812            *cp : modules/mappers/mod_negotiation.c line=747 column=11
c
p++ : pass=0
+
= : enter=0, leave=0
=
 '\n';
813            *cp : modules/mappers/mod_negotiation.c line=747 column=11
c
= : enter=0, leave=0
=
 '\0';
814        }
815        else {
816
817            /* Line beginning with something other than whitespace */
818
819            apr_file_ungetc : enter=0, leave=0

apr_file_ungetc : /usr/include/apr-1/apr_file_io.h line=533 column=27
a
pr_file_ungetc(c : modules/mappers/mod_negotiation.c line=748 column=10
c
map : modules/mappers/mod_negotiation.c line=744 column=77
m
ap);
820            return : pass=0
r
eturn header_seen : modules/mappers/mod_negotiation.c line=741 column=17
h
eader_seen;
821        }
822    }
823
824    return : pass=0
r
eturn header_seen : modules/mappers/mod_negotiation.c line=741 column=17
h
eader_seen;
825}
826
827static apr_off_t get_body : call=0
g
et_body(char *buffer, apr_size_t *len, const char *tag,
828                          apr_file_t *map)
829{
830    char *endbody;
831    int bodylen;
832    int taglen;
833    apr_off_t pos;
834
835    taglen : modules/mappers/mod_negotiation.c line=832 column=9
t
aglen = : pass=0
=
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(tag : modules/mappers/mod_negotiation.c line=827 column=70
t
ag);
836    * dereference : enter=0, leave=0
*
len : modules/mappers/mod_negotiation.c line=827 column=53
l
en -= : enter=0, leave=0
-
taglen : modules/mappers/mod_negotiation.c line=832 column=9
t
aglen;
837
838    /* We are at the first character following a body:tag\n entry
839     * Suck in the body, then backspace to the first char after the
840     * closing tag entry.  If we fail to read, find the tag or back
841     * up then we have a hosed file, so give up already
842     */
843    if : true=0, false=0
i
f (apr_file_read : enter=0, leave=0

apr_file_read : /usr/include/apr-1/apr_file_io.h line=407 column=27
a
pr_file_read(map : modules/mappers/mod_negotiation.c line=828 column=39
m
ap, buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer, len : modules/mappers/mod_negotiation.c line=827 column=53
l
en) != : true=0, false=0
!
= APR_SUCCESS) {
844        return : pass=0
r
eturn -1;
845    }
846
847    /* put a copy of the tag *after* the data read from the file
848     * so that strstr() will find something with no reliance on
849     * terminating '\0'
850     */
851    memcpy : enter=0, leave=0

memcpy : /usr/include/string.h line=44 column=14
m
emcpy(buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer + : pass=0
+
 * dereference : enter=0, leave=0
*
len : modules/mappers/mod_negotiation.c line=827 column=53
l
en, tag : modules/mappers/mod_negotiation.c line=827 column=70
t
ag, taglen : modules/mappers/mod_negotiation.c line=832 column=9
t
aglen);
852    endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody = : pass=0
=
 strstr : enter=0, leave=0

strstr : /usr/include/string.h line=342 column=14
s
trstr(buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer, tag : modules/mappers/mod_negotiation.c line=827 column=70
t
ag);
853    if : true=0, false=0
i
f (endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody == : true=0, false=0
=
buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer + : pass=0
+
 * dereference : enter=0, leave=0
*
len : modules/mappers/mod_negotiation.c line=827 column=53
l
en) {
854        return : pass=0
r
eturn -1;
855    }
856    bodylen : modules/mappers/mod_negotiation.c line=831 column=9
b
odylen = : pass=0
=
 endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody - : pass=0
-
 buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer;
857    endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody += : pass=0
+
taglen : modules/mappers/mod_negotiation.c line=832 column=9
t
aglen;
858    /* Skip all the trailing cruft after the end tag to the next line */
859    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody) {
860        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody == : true=0, false=0
=
= '\n') {
861            ++ : pass=0
+
+endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody;
862            break : pass=0
b
reak;
863        }
864        ++ : pass=0
+
+endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody;
865    }
866
867    pos : modules/mappers/mod_negotiation.c line=833 column=15
p
os = : pass=0
=
 -(apr_off_t)(* dereference : enter=0, leave=0
*
len : modules/mappers/mod_negotiation.c line=827 column=53
l
en - : pass=0
-
 (endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody - : pass=0
-
 buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer));
868    if : true=0, false=0
i
f (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(map : modules/mappers/mod_negotiation.c line=828 column=39
m
ap, APR_CUR, &pos : modules/mappers/mod_negotiation.c line=833 column=15
p
os) != : true=0, false=0
!
= APR_SUCCESS) {
869        return : pass=0
r
eturn -1;
870    }
871
872    /* Give the caller back the actual body's file offset and length */
873    *len : modules/mappers/mod_negotiation.c line=827 column=53
l
en = : enter=0, leave=0
=
 bodylen : modules/mappers/mod_negotiation.c line=831 column=9
b
odylen;
874    return : pass=0
r
eturn pos : modules/mappers/mod_negotiation.c line=833 column=15
p
os - : pass=0
-
 (endbody : modules/mappers/mod_negotiation.c line=830 column=11
e
ndbody - : pass=0
-
 buffer : modules/mappers/mod_negotiation.c line=827 column=33
b
uffer);
875}
876
877
878/* Stripping out RFC822 comments */
879
880static void strip_paren_comments : call=0
s
trip_paren_comments(char *hdr)
881{
882    /* Hmmm... is this correct?  In Roy's latest draft, (comments) can nest! */
883    /* Nope, it isn't correct.  Fails to handle backslash escape as well.    */
884
885    while : true=0, false=0
w
hile (* dereference : enter=0, leave=0
*
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr) {
886        if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr == : true=0, false=0
=
= '"') {
887            hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr = : pass=0
=
 strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr, '"');
888            if : true=0, false=0
i
f (hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr == : true=0, false=0
=
= NULL) {
889                return : pass=0
r
eturn;
890            }
891            ++ : pass=0
+
+hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr;
892        }
893        else if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr == : true=0, false=0
=
= '(') {
894            while : true=0, false=0
w
hile (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr && : true=0, false=0
&
* dereference : enter=0, leave=0
*
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= ')') {
895                *hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr++ : pass=0
+
= : enter=0, leave=0
=
 ' ';
896            }
897
898            if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr) {
899                *hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr++ : pass=0
+
= : enter=0, leave=0
=
 ' ';
900            }
901        }
902        else {
903            ++ : pass=0
+
+hdr : modules/mappers/mod_negotiation.c line=880 column=40
h
dr;
904        }
905    }
906}
907
908/* Getting to a header body from the header */
909
910static char *lcase_header_name_return_body : call=0
l
case_header_name_return_body(char *header, request_rec *r)
911{
912    char *cp = header : modules/mappers/mod_negotiation.c line=910 column=50
h
eader;
913
914    for : true=0, false=0
f
or ( ; MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
&& : true=0, false=0
&
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
!= : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= ':' ; ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p) {
915        *cp : modules/mappers/mod_negotiation.c line=912 column=11
c
= : enter=0, leave=0
=
 apr_tolower(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p);
916    }
917
918    if : true=0, false=0
i
f (! : true=0, false=0
!
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p) {
919        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/mappers/mod_negotiation.c line=910 column=71
r
,
920                      "Syntax error in type map, no ':' in %s for header %s",
921                      r : modules/mappers/mod_negotiation.c line=910 column=71
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename, header : modules/mappers/mod_negotiation.c line=910 column=50
h
eader);
922        return : pass=0
r
eturn NULL;
923    }
924
925    do {
926        ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p;
927    } while : true=0, false=0
w
hile (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
&& : true=0, false=0
&
& apr_isspace(* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p));
928
929    if : true=0, false=0
i
f (! : true=0, false=0
!
* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p) {
930        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/mappers/mod_negotiation.c line=910 column=71
r
,
931                      "Syntax error in type map --- no header body: %s for %s",
932                      r : modules/mappers/mod_negotiation.c line=910 column=71
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename, header : modules/mappers/mod_negotiation.c line=910 column=50
h
eader);
933        return : pass=0
r
eturn NULL;
934    }
935
936    return : pass=0
r
eturn cp : modules/mappers/mod_negotiation.c line=912 column=11
c
p;
937}
938
939static int read_type_map : call=0
r
ead_type_map(apr_file_t **map, negotiation_state *neg,
940                         request_rec *rr)
941{
942    request_rec *r = neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
;
943    apr_file_t *map_ = NULL;
944    apr_status_t status;
945    char buffer[MAX_STRING_LEN];
946    enum header_state hstate;
947    struct var_rec mime_info;
948    int has_content;
949
950    if : true=0, false=0
i
f (! : true=0, false=0
!
map : modules/mappers/mod_negotiation.c line=939 column=39
m
ap)
951        map : modules/mappers/mod_negotiation.c line=939 column=39
m
ap = : pass=0
=
 &map_ : modules/mappers/mod_negotiation.c line=943 column=17
m
ap_;
952
953    /* We are not using multiviews */
954    neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>count_multiviews_variants : modules/mappers/mod_negotiation.c line=264 column=9
c
ount_multiviews_variants = : enter=0, leave=0
=
 0;
955
956    if : true=0, false=0
i
f ((status : modules/mappers/mod_negotiation.c line=944 column=18
s
tatus = : 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(map : modules/mappers/mod_negotiation.c line=939 column=39
m
ap, rr : modules/mappers/mod_negotiation.c line=940 column=39
r
r-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename, APR_READ | : pass=0
|
 APR_BUFFERED,
957                APR_OS_DEFAULT, neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool)) != : true=0, false=0
!
= APR_SUCCESS) {
958        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, status : modules/mappers/mod_negotiation.c line=944 column=18
s
tatus, r : modules/mappers/mod_negotiation.c line=942 column=18
r
,
959                      "cannot access type map file: %s", rr : modules/mappers/mod_negotiation.c line=940 column=39
r
r-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
960        if : true=0, false=0
i
f (APR_STATUS_IS_ENOTDIR(status : modules/mappers/mod_negotiation.c line=944 column=18
s
tatus) || : true=0, false=0
|
| APR_STATUS_IS_ENOENT(status : modules/mappers/mod_negotiation.c line=944 column=18
s
tatus)) {
961            return : pass=0
r
eturn HTTP_NOT_FOUND;
962        }
963        else {
964            return : pass=0
r
eturn HTTP_FORBIDDEN;
965        }
966    }
967
968    clean_var_rec : enter=0, leave=0

clean_var_rec : modules/mappers/mod_negotiation.c line=279 column=13
c
lean_var_rec(&mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info);
969    has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 0;
970
971    do {
972        hstate : modules/mappers/mod_negotiation.c line=946 column=23
h
state = : pass=0
=
 get_header_line : enter=0, leave=0

get_header_line : modules/mappers/mod_negotiation.c line=744 column=26
g
et_header_line(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, MAX_STRING_LEN, * dereference : enter=0, leave=0
*
map : modules/mappers/mod_negotiation.c line=939 column=39
m
ap);
973
974        if : true=0, false=0
i
f (hstate : modules/mappers/mod_negotiation.c line=946 column=23
h
state == : true=0, false=0
=
header_seen : modules/mappers/mod_negotiation.c line=741 column=17
h
eader_seen) {
975            char *body1 = lcase_header_name_return_body : enter=0, leave=0

lcase_header_name_return_body : modules/mappers/mod_negotiation.c line=910 column=14
l
case_header_name_return_body(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
);
976            const char *body;
977
978            if : true=0, false=0
i
f (body1 : modules/mappers/mod_negotiation.c line=975 column=19
b
ody1 == : true=0, false=0
=
= NULL) {
979                return : pass=0
r
eturn HTTP_INTERNAL_SERVER_ERROR;
980            }
981
982            strip_paren_comments : enter=0, leave=0

strip_paren_comments : modules/mappers/mod_negotiation.c line=880 column=13
s
trip_paren_comments(body1 : modules/mappers/mod_negotiation.c line=975 column=19
b
ody1);
983            body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody = : pass=0
=
 body1 : modules/mappers/mod_negotiation.c line=975 column=19
b
ody1;
984
985            if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "uri:", 4)) {
986                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name = : pass=0
=
 ap_get_token : enter=0, leave=0

ap_get_token : include/httpd.h line=1423 column=20
a
p_get_token(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, &body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody, 0);
987            }
988            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "content-type:", 13)) {
989                struct accept_rec accept_info;
990
991                get_entry : enter=0, leave=0

get_entry : modules/mappers/mod_negotiation.c line=409 column=20
g
et_entry(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, &accept_info : modules/mappers/mod_negotiation.c line=989 column=35
a
ccept_info, body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody);
992                set_mime_fields : enter=0, leave=0

set_mime_fields : modules/mappers/mod_negotiation.c line=309 column=13
s
et_mime_fields(&mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info, &accept_info : modules/mappers/mod_negotiation.c line=989 column=35
a
ccept_info);
993                has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 1;
994            }
995            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "content-length:", 15)) {
996                char *errp;
997                apr_off_t number;
998
999                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/mappers/mod_negotiation.c line=997 column=27
n
umber, body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody, &errp : modules/mappers/mod_negotiation.c line=996 column=23
e
rrp, 10)
1000                    || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
errp : modules/mappers/mod_negotiation.c line=996 column=23
e
rrp || : true=0, false=0
|
number : modules/mappers/mod_negotiation.c line=997 column=27
n
umber < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 0) {
1001                    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/mappers/mod_negotiation.c line=942 column=18
r
,
1002                                  "Parse error in type map, Content-Length: "
1003                                  "'%s' in %s is invalid.",
1004                                  body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody, r : modules/mappers/mod_negotiation.c line=942 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
1005                    break : pass=0
b
reak;
1006                }
1007                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes = : pass=0
=
 number : modules/mappers/mod_negotiation.c line=997 column=27
n
umber;
1008                has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 1;
1009            }
1010            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "content-language:", 17)) {
1011                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages = : pass=0
=
 do_languages_line : enter=0, leave=0

do_languages_line : modules/mappers/mod_negotiation.c line=539 column=28
d
o_languages_line(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool,
1012                                                                &body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody);
1013                has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 1;
1014            }
1015            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "content-encoding:", 17)) {
1016                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding = : pass=0
=
 ap_get_token : enter=0, leave=0

ap_get_token : include/httpd.h line=1423 column=20
a
p_get_token(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, &body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody, 0);
1017                has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 1;
1018            }
1019            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "description:", 12)) {
1020                char *desc = apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody);
1021                char *cp;
1022
1023                for : true=0, false=0
f
or (cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
= : pass=0
=
 desc : modules/mappers/mod_negotiation.c line=1020 column=23
d
esc; * dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p; ++ : pass=0
+
+cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p) {
1024                    if : true=0, false=0
i
f (* dereference : enter=0, leave=0
*
cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p== : true=0, false=0
=
='\n') *cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p= : enter=0, leave=0
=
' ';
1025                }
1026                if : true=0, false=0
i
f (cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p> : true=0, false=0
>
desc : modules/mappers/mod_negotiation.c line=1020 column=23
d
esc) *(cp : modules/mappers/mod_negotiation.c line=1021 column=23
c
p- : pass=0
-
1)= : enter=0, leave=0
=
0;
1027                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.description : modules/mappers/mod_negotiation.c line=210 column=17
d
escription = : pass=0
=
 desc : modules/mappers/mod_negotiation.c line=1020 column=23
d
esc;
1028            }
1029            else if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, "body:", 5)) {
1030                char *tag = apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, body : modules/mappers/mod_negotiation.c line=976 column=25
b
ody);
1031                char *eol = strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(tag : modules/mappers/mod_negotiation.c line=1030 column=23
t
ag, '\0');
1032                apr_size_t len = MAX_STRING_LEN;
1033                while : true=0, false=0
w
hile (-- : pass=0
-
-eol : modules/mappers/mod_negotiation.c line=1031 column=23
e
ol >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
tag : modules/mappers/mod_negotiation.c line=1030 column=23
t
ag && : true=0, false=0
&
& apr_isspace(* dereference : enter=0, leave=0
*
eol : modules/mappers/mod_negotiation.c line=1031 column=23
e
ol))
1034                    *eol : modules/mappers/mod_negotiation.c line=1031 column=23
e
ol = : enter=0, leave=0
=
 '\0';
1035                if : true=0, false=0
i
f ((mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.body : modules/mappers/mod_negotiation.c line=206 column=15
b
ody = : pass=0
=
 get_body : enter=0, leave=0

get_body : modules/mappers/mod_negotiation.c line=827 column=18
g
et_body(buffer : modules/mappers/mod_negotiation.c line=945 column=10
b
uffer, &len : modules/mappers/mod_negotiation.c line=1032 column=28
l
en, tag : modules/mappers/mod_negotiation.c line=1030 column=23
t
ag, * dereference : enter=0, leave=0
*
map : modules/mappers/mod_negotiation.c line=939 column=39
m
ap)) < : true=0, false=0
<
 0) {
1036                    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/mappers/mod_negotiation.c line=942 column=18
r
,
1037                                  "Syntax error in type map, no end tag '%s'"
1038                                  "found in %s for Body: content.",
1039                                  tag : modules/mappers/mod_negotiation.c line=1030 column=23
t
ag, r : modules/mappers/mod_negotiation.c line=942 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
1040                     break : pass=0
b
reak;
1041                }
1042                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes = : pass=0
=
 len : modules/mappers/mod_negotiation.c line=1032 column=28
l
en;
1043                mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name = : pass=0
=
 apr_filepath_name_get : enter=0, leave=0

apr_filepath_name_get : /usr/include/apr-1/apr_lib.h line=84 column=27
a
pr_filepath_name_get(rr : modules/mappers/mod_negotiation.c line=940 column=39
r
r-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
1044            }
1045        }
1046        else {
1047            if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info.file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name && : true=0, false=0
&
MC/DC independently affect : true=0, false=0

has_content : modules/mappers/mod_negotiation.c line=948 column=9
hTF
as_content) {
1048                void *new_var = 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(neg : modules/mappers/mod_negotiation.c line=939 column=63
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars);
1049
1050                memcpy : enter=0, leave=0

memcpy : /usr/include/string.h line=44 column=14
m
emcpy(new_var : modules/mappers/mod_negotiation.c line=1048 column=23
n
ew_var, (void *) &mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info, sizeof(var_rec));
1051            }
1052
1053            clean_var_rec : enter=0, leave=0

clean_var_rec : modules/mappers/mod_negotiation.c line=279 column=13
c
lean_var_rec(&mime_info : modules/mappers/mod_negotiation.c line=947 column=20
m
ime_info);
1054            has_content : modules/mappers/mod_negotiation.c line=948 column=9
h
as_content = : pass=0
=
 0;
1055        }
1056    } while : true=0, false=0
w
hile (hstate : modules/mappers/mod_negotiation.c line=946 column=23
h
state != : true=0, false=0
!
header_eof : modules/mappers/mod_negotiation.c line=741 column=5
h
eader_eof);
1057
1058    if : true=0, false=0
i
f (map_ : modules/mappers/mod_negotiation.c line=943 column=17
m
ap_)
1059        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(map_ : modules/mappers/mod_negotiation.c line=943 column=17
m
ap_);
1060
1061    set_vlist_validator : enter=0, leave=0

set_vlist_validator : modules/mappers/mod_negotiation.c line=323 column=13
s
et_vlist_validator(r : modules/mappers/mod_negotiation.c line=942 column=18
r
rr : modules/mappers/mod_negotiation.c line=940 column=39
r
r);
1062
1063    return : pass=0
r
eturn OK;
1064}
1065
1066
1067/* Sort function used by read_types_multi. */
1068static int variantsortf : call=0
v
ariantsortf(var_rec *a, var_rec *b) {
1069
1070    /* First key is the source quality, sort in descending order. */
1071
1072    /* XXX: note that we currently implement no method of setting the
1073     * source quality for multiviews variants, so we are always comparing
1074     * 1.0 to 1.0 for now
1075     */
1076    if : true=0, false=0
i
f (a : modules/mappers/mod_negotiation.c line=1068 column=34
a
-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality < : true=0, false=0
<
 b : modules/mappers/mod_negotiation.c line=1068 column=46
b
-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality)
1077        return : pass=0
r
eturn 1;
1078    if : true=0, false=0
i
f (a : modules/mappers/mod_negotiation.c line=1068 column=34
a
-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality > : true=0, false=0
>
 b : modules/mappers/mod_negotiation.c line=1068 column=46
b
-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality)
1079        return : pass=0
r
eturn -1;
1080
1081    /* Second key is the variant name */
1082    return : pass=0
r
eturn strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(a : modules/mappers/mod_negotiation.c line=1068 column=34
a
-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name, b : modules/mappers/mod_negotiation.c line=1068 column=46
b
-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name);
1083}
1084
1085/*****************************************************************
1086 *
1087 * Same as read_type_map, except we use a filtered directory listing
1088 * as the map...
1089 */
1090
1091static int read_types_multi : call=0
r
ead_types_multi(negotiation_state *neg)
1092{
1093    request_rec *r = neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
;
1094
1095    char *filp;
1096    int prefix_len;
1097    apr_dir_t *dirp;
1098    apr_finfo_t dirent;
1099    apr_status_t status;
1100    struct var_rec mime_info;
1101    struct accept_rec accept_info;
1102    void *new_var;
1103    int anymatch = 0;
1104
1105    clean_var_rec : enter=0, leave=0

clean_var_rec : modules/mappers/mod_negotiation.c line=279 column=13
c
lean_var_rec(&mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info);
1106
1107    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=1093 column=18
r
MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>proxyreq : include/httpd.h line=806 column=9
p
roxyreq || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
r : modules/mappers/mod_negotiation.c line=1093 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename
1108                    || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
ap_os_is_path_absolute : enter=0, leave=0

ap_os_is_path_absolute : include/httpd.h line=1610 column=17
a
p_os_is_path_absolute(neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, r : modules/mappers/mod_negotiation.c line=1093 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename)) {
1109        return : pass=0
r
eturn DECLINED;
1110    }
1111
1112    /* Only absolute paths here */
1113    if : true=0, false=0
i
f (! : true=0, false=0
!
(filp : modules/mappers/mod_negotiation.c line=1095 column=11
f
ilp = : pass=0
=
 strrchr : enter=0, leave=0

strrchr : /usr/include/string.h line=262 column=14
s
trrchr(r : modules/mappers/mod_negotiation.c line=1093 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename, '/'))) {
1114        return : pass=0
r
eturn DECLINED;
1115    }
1116    ++ : pass=0
+
+filp : modules/mappers/mod_negotiation.c line=1095 column=11
f
ilp;
1117    prefix_len : modules/mappers/mod_negotiation.c line=1096 column=9
p
refix_len = : pass=0
=
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(filp : modules/mappers/mod_negotiation.c line=1095 column=11
f
ilp);
1118
1119    if : true=0, false=0
i
f ((status : modules/mappers/mod_negotiation.c line=1099 column=18
s
tatus = : pass=0
=
 apr_dir_open : enter=0, leave=0

apr_dir_open : /usr/include/apr-1/apr_file_info.h line=244 column=27
a
pr_dir_open(&dirp : modules/mappers/mod_negotiation.c line=1097 column=16
d
irp, neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>dir_name : modules/mappers/mod_negotiation.c line=250 column=11
d
ir_name,
1120                               neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool)) != : true=0, false=0
!
= APR_SUCCESS) {
1121        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, status : modules/mappers/mod_negotiation.c line=1099 column=18
s
tatus, r : modules/mappers/mod_negotiation.c line=1093 column=18
r
,
1122                    "cannot read directory for multi: %s", neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>dir_name : modules/mappers/mod_negotiation.c line=250 column=11
d
ir_name);
1123        return : pass=0
r
eturn HTTP_FORBIDDEN;
1124    }
1125
1126    while : true=0, false=0
w
hile (apr_dir_read : enter=0, leave=0

apr_dir_read : /usr/include/apr-1/apr_file_info.h line=267 column=27
a
pr_dir_read(&dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent, APR_FINFO_DIRENT, dirp : modules/mappers/mod_negotiation.c line=1097 column=16
d
irp) == : true=0, false=0
=
= APR_SUCCESS) {
1127        apr_array_header_t *exception_list;
1128        request_rec *sub_req;
1129
1130        /* Do we have a match? */
1131#ifdef CASE_BLIND_FILESYSTEM
1132        if (strncasecmp(dirent.name, filp, prefix_len)) {
1133#else
1134        if : true=0, false=0
i
f (strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent.name : /usr/include/apr-1/apr_file_info.h line=210 column=17 name, filp : modules/mappers/mod_negotiation.c line=1095 column=11
f
ilp, prefix_len : modules/mappers/mod_negotiation.c line=1096 column=9
p
refix_len)) {
1135#endif
1136            continue : pass=0
c
ontinue;
1137        }
1138        if : true=0, false=0
i
f (dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent.name : /usr/include/apr-1/apr_file_info.h line=210 column=17 name[] : enter=0, leave=0
[
prefix_len : modules/mappers/mod_negotiation.c line=1096 column=9
p
refix_len] != : true=0, false=0
!
= '.') {
1139            continue : pass=0
c
ontinue;
1140        }
1141
1142        /* Don't negotiate directories and other unusual files
1143         * Really shouldn't see anything but DIR/LNK/REG here,
1144         * and we aught to discover if the LNK was interesting.
1145         *
1146         * Of course, this only helps platforms that capture the
1147         * the filetype in apr_dir_read(), which most can once
1148         * they are optimized with some magic [it's known to the
1149         * dirent, not associated to the inode, on most FS's.]
1150         */
1151        if : true=0, false=0
i
f ((dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent.valid : /usr/include/apr-1/apr_file_info.h line=179 column=17 valid & : pass=0
&
 APR_FINFO_TYPE) && : true=0, false=0
&
& (dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent.filetype : /usr/include/apr-1/apr_file_info.h line=186 column=20 filetype == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
APR_DIR : /usr/include/apr-1/apr_file_info.h line=65 column=5 APR_DIR))
1152            continue : pass=0
c
ontinue;
1153
1154        /* Ok, something's here.  Maybe nothing useful.  Remember that
1155         * we tried, if we completely fail, so we can reject the request!
1156         */
1157        anymatch : modules/mappers/mod_negotiation.c line=1103 column=9
a
nymatch = : pass=0
=
 1;
1158
1159        /* See if it's something which we have access to, and which
1160         * has a known type and encoding (as opposed to something
1161         * which we'll be slapping default_type on later).
1162         */
1163        sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req = : pass=0
=
 ap_sub_req_lookup_dirent : enter=0, leave=0

ap_sub_req_lookup_dirent : include/http_request.h line=105 column=27
a
p_sub_req_lookup_dirent(&dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent, r : modules/mappers/mod_negotiation.c line=1093 column=18
r
, AP_SUBREQ_MERGE_ARGS,
1164                                           NULL);
1165
1166        /* Double check, we still don't multi-resolve non-ordinary files
1167         */
1168        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : 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
!
APR_REG : /usr/include/apr-1/apr_file_info.h line=64 column=5 APR_REG) {
1169            /* XXX sub req not destroyed -- may be a bug/unintentional ? */
1170            continue : pass=0
c
ontinue;
1171        }
1172
1173        /* If it has a handler, we'll pretend it's a CGI script,
1174         * since that's a good indication of the sort of thing it
1175         * might be doing.
1176         */
1177        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_reqMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>handler : include/httpd.h line=919 column=17
h
andler && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_type : include/httpd.h line=917 column=17
c
ontent_type) {
1178            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(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req, CGI_MAGIC_TYPE);
1179        }
1180
1181        /*
1182         * mod_mime will _always_ provide us the base name in the
1183         * ap-mime-exception-list, if it processed anything.  If
1184         * this list is empty, give up immediately, there was
1185         * nothing interesting.  For example, looking at the files
1186         * readme.txt and readme.foo, we will throw away .foo if
1187         * it's an insignificant file (e.g. did not identify a
1188         * language, charset, encoding, content type or handler,)
1189         */
1190        exception_list : modules/mappers/mod_negotiation.c line=1127 column=29
e
xception_list = : pass=0
=
1191            (apr_array_header_t *)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(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes,
1192                                                "ap-mime-exceptions-list");
1193
1194        if : true=0, false=0
i
f (! : true=0, false=0
!
exception_list : modules/mappers/mod_negotiation.c line=1127 column=29
e
xception_list) {
1195            ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req);
1196            continue : pass=0
c
ontinue;
1197        }
1198
1199        /* Each unregonized bit better match our base name, in sequence.
1200         * A test of index.html.foo will match index.foo or index.html.foo,
1201         * but it will never transpose the segments and allow index.foo.html
1202         * because that would introduce too much CPU consumption.  Better that
1203         * we don't attempt a many-to-many match here.
1204         */
1205        {
1206            int nexcept = exception_list : modules/mappers/mod_negotiation.c line=1127 column=29
e
xception_list-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts;
1207            char **cur_except = (char**)exception_list : modules/mappers/mod_negotiation.c line=1127 column=29
e
xception_list-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1208            char *segstart = filp : modules/mappers/mod_negotiation.c line=1095 column=11
f
ilp, *segend, saveend;
1209
1210            while : true=0, false=0
w
hile (MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
segstart : modules/mappers/mod_negotiation.c line=1208 column=19
s
egstart && : true=0, false=0
&
MC/DC independently affect : true=0, false=0

nexcept : modules/mappers/mod_negotiation.c line=1206 column=17
nTF
except) {
1211                if : true=0, false=0
i
f (! : true=0, false=0
!
(segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend = : pass=0
=
 strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(segstart : modules/mappers/mod_negotiation.c line=1208 column=19
s
egstart, '.')))
1212                    segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend = : pass=0
=
 strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(segstart : modules/mappers/mod_negotiation.c line=1208 column=19
s
egstart, '\0');
1213                saveend : modules/mappers/mod_negotiation.c line=1208 column=45
s
aveend = : pass=0
=
 * dereference : enter=0, leave=0
*
segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend;
1214                *segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend = : enter=0, leave=0
=
 '\0';
1215
1216#ifdef CASE_BLIND_FILESYSTEM
1217                if (strcasecmp(segstart, *cur_except) == 0) {
1218#else
1219                if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(segstart : modules/mappers/mod_negotiation.c line=1208 column=19
s
egstart, * dereference : enter=0, leave=0
*
cur_except : modules/mappers/mod_negotiation.c line=1207 column=20
c
ur_except) == : true=0, false=0
=
= 0) {
1220#endif
1221                    -- : pass=0
-
-nexcept : modules/mappers/mod_negotiation.c line=1206 column=17
n
except;
1222                    ++ : pass=0
+
+cur_except : modules/mappers/mod_negotiation.c line=1207 column=20
c
ur_except;
1223                }
1224
1225                if : true=0, false=0
i
f (! : true=0, false=0
!
saveend : modules/mappers/mod_negotiation.c line=1208 column=45
s
aveend)
1226                    break : pass=0
b
reak;
1227
1228                *segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend = : enter=0, leave=0
=
 saveend : modules/mappers/mod_negotiation.c line=1208 column=45
s
aveend;
1229                segstart : modules/mappers/mod_negotiation.c line=1208 column=19
s
egstart = : pass=0
=
 segend : modules/mappers/mod_negotiation.c line=1208 column=37
s
egend + : pass=0
+
 1;
1230            }
1231
1232            if : true=0, false=0
i
f (nexcept : modules/mappers/mod_negotiation.c line=1206 column=17
n
except) {
1233                /* Something you don't know is, something you don't know...
1234                 */
1235                ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req);
1236                continue : pass=0
c
ontinue;
1237            }
1238        }
1239
1240        /*
1241         * ###: be warned, the _default_ content type is already
1242         * picked up here!  If we failed the subrequest, or don't
1243         * know what we are serving, then continue.
1244         */
1245        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : 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
|
| (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_type : include/httpd.h line=917 column=17
c
ontent_type)) {
1246            ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req);
1247            continue : pass=0
c
ontinue;
1248        }
1249
1250        /* If it's a map file, we use that instead of the map
1251         * we're building...
1252         */
1253        if : true=0, false=0
i
f (((sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_reqMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_type : include/httpd.h line=917 column=17
c
ontent_type) && : true=0, false=0
&
&
1254             ! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_type : include/httpd.h line=917 column=17
c
ontent_type, MAP_FILE_MAGIC_TYPE)) || : true=0, false=0
|
|
1255            ((sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_reqMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>handler : include/httpd.h line=919 column=17
h
andler) && : true=0, false=0
&
&
1256             ! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler, "type-map"))) {
1257
1258            apr_dir_close : enter=0, leave=0

apr_dir_close : /usr/include/apr-1/apr_file_info.h line=252 column=27
a
pr_dir_close(dirp : modules/mappers/mod_negotiation.c line=1097 column=16
d
irp);
1259            neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts = : enter=0, leave=0
=
 0;
1260            if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus != : true=0, false=0
!
= HTTP_OK) {
1261                return : pass=0
r
eturn sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus;
1262            }
1263            return : pass=0
r
eturn read_type_map : enter=0, leave=0

read_type_map : modules/mappers/mod_negotiation.c line=939 column=12
r
ead_type_map(NULL, neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg, sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req);
1264        }
1265
1266        /* Have reasonable variant --- gather notes. */
1267
1268        mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info.sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req = : pass=0
=
 sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req;
1269        mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info.file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name = : pass=0
=
 apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, dirent : modules/mappers/mod_negotiation.c line=1098 column=17
d
irent.name : /usr/include/apr-1/apr_file_info.h line=210 column=17 name);
1270        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding) {
1271            mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info.content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding = : pass=0
=
 sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding;
1272        }
1273        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_languages : include/httpd.h line=924 column=25
c
ontent_languages) {
1274            mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info.content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages = : pass=0
=
 sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_languages : include/httpd.h line=924 column=25
c
ontent_languages;
1275        }
1276
1277        get_entry : enter=0, leave=0

get_entry : modules/mappers/mod_negotiation.c line=409 column=20
g
et_entry(neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, &accept_info : modules/mappers/mod_negotiation.c line=1101 column=23
a
ccept_info, sub_req : modules/mappers/mod_negotiation.c line=1128 column=22
s
ub_req-> : enter=0, leave=0
-
>content_type : include/httpd.h line=917 column=17
c
ontent_type);
1278        set_mime_fields : enter=0, leave=0

set_mime_fields : modules/mappers/mod_negotiation.c line=309 column=13
s
et_mime_fields(&mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info, &accept_info : modules/mappers/mod_negotiation.c line=1101 column=23
a
ccept_info);
1279
1280        new_var : modules/mappers/mod_negotiation.c line=1102 column=11
n
ew_var = : pass=0
=
 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(neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars);
1281        memcpy : enter=0, leave=0

memcpy : /usr/include/string.h line=44 column=14
m
emcpy(new_var : modules/mappers/mod_negotiation.c line=1102 column=11
n
ew_var, (void *) &mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info, sizeof(var_rec));
1282
1283        neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>count_multiviews_variants : modules/mappers/mod_negotiation.c line=264 column=9
c
ount_multiviews_variants++ : pass=0
+
+;
1284
1285        clean_var_rec : enter=0, leave=0

clean_var_rec : modules/mappers/mod_negotiation.c line=279 column=13
c
lean_var_rec(&mime_info : modules/mappers/mod_negotiation.c line=1100 column=20
m
ime_info);
1286    }
1287
1288    apr_dir_close : enter=0, leave=0

apr_dir_close : /usr/include/apr-1/apr_file_info.h line=252 column=27
a
pr_dir_close(dirp : modules/mappers/mod_negotiation.c line=1097 column=16
d
irp);
1289
1290    /* We found some file names that matched.  None could be served.
1291     * Rather than fall out to autoindex or some other mapper, this
1292     * request must die.
1293     */
1294    if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

anymatch : modules/mappers/mod_negotiation.c line=1103 column=9
aTF
nymatch && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
1295        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/mappers/mod_negotiation.c line=1093 column=18
r
,
1296                      "Negotiation: discovered file(s) matching request: %s"
1297                      " (None could be negotiated).",
1298                      r : modules/mappers/mod_negotiation.c line=1093 column=18
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
1299        return : pass=0
r
eturn HTTP_NOT_FOUND;
1300    }
1301
1302    set_vlist_validator : enter=0, leave=0

set_vlist_validator : modules/mappers/mod_negotiation.c line=323 column=13
s
et_vlist_validator(r : modules/mappers/mod_negotiation.c line=1093 column=18
r
r : modules/mappers/mod_negotiation.c line=1093 column=18
r
);
1303
1304    /* Sort the variants into a canonical order.  The negotiation
1305     * result sometimes depends on the order of the variants.  By
1306     * sorting the variants into a canonical order, rather than using
1307     * the order in which readdir() happens to return them, we ensure
1308     * that the negotiation result will be consistent over filesystem
1309     * backup/restores and over all mirror sites.
1310     */
1311
1312    qsort : enter=0, leave=0

qsort : /usr/include/stdlib.h line=761 column=13
q
sort((void *) neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts, neg : modules/mappers/mod_negotiation.c line=1091 column=48
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts,
1313          sizeof(var_rec), (int (*)(const void *, const void *)) variantsortf : modules/mappers/mod_negotiation.c line=1068 column=12
v
ariantsortf);
1314
1315    return : pass=0
r
eturn OK;
1316}
1317
1318
1319/*****************************************************************
1320 * And now for the code you've been waiting for... actually
1321 * finding a match to the client's requirements.
1322 */
1323
1324/* Matching MIME types ... the star/star and foo/star commenting conventions
1325 * are implemented here.  (You know what I mean by star/star, but just
1326 * try mentioning those three characters in a C comment).  Using strcmp()
1327 * is legit, because everything has already been smashed to lowercase.
1328 *
1329 * Note also that if we get an exact match on the media type, we update
1330 * level_matched for use in level_cmp below...
1331 *
1332 * We also give a value for mime_stars, which is used later. It should
1333 * be 1 for star/star, 2 for type/star and 3 for type/subtype.
1334 */
1335
1336static int mime_match : call=0
m
ime_match(accept_rec *accept_r, var_rec *avail)
1337{
1338    const char *accept_type = accept_r : modules/mappers/mod_negotiation.c line=1336 column=35
a
ccept_r-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame;
1339    const char *avail_type = avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type;
1340    int len = strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type);
1341
1342    if : true=0, false=0
i
f (accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type[] : enter=0, leave=0
[
0] == : true=0, false=0
=
= '*') {        /* Anything matches star/star */
1343        if : true=0, false=0
i
f (avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars < : true=0, false=0
<
 1) {
1344            avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars = : enter=0, leave=0
=
 1;
1345        }
1346        return : pass=0
r
eturn 1;
1347    }
1348    else if : true=0, false=0
i
f ((accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type[] : enter=0, leave=0
[
len : modules/mappers/mod_negotiation.c line=1340 column=9
l
en - : pass=0
-
 1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '*') && : true=0, false=0
&
&
1349             ! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type, avail_type : modules/mappers/mod_negotiation.c line=1339 column=17
a
vail_type, len : modules/mappers/mod_negotiation.c line=1340 column=9
l
en - : pass=0
-
 2)) {
1350        if : true=0, false=0
i
f (avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars < : true=0, false=0
<
 2) {
1351            avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars = : enter=0, leave=0
=
 2;
1352        }
1353        return : pass=0
r
eturn 1;
1354    }
1355    else if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type, avail_type : modules/mappers/mod_negotiation.c line=1339 column=17
a
vail_type)
1356             || : true=0, false=0
|
| (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(accept_type : modules/mappers/mod_negotiation.c line=1338 column=17
a
ccept_type, "text/html")
1357                 && : true=0, false=0
&
& (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(avail_type : modules/mappers/mod_negotiation.c line=1339 column=17
a
vail_type, INCLUDES_MAGIC_TYPE)
1358                     || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(avail_type : modules/mappers/mod_negotiation.c line=1339 column=17
a
vail_type, INCLUDES_MAGIC_TYPE3)))) {
1359        if : true=0, false=0
i
f (accept_r : modules/mappers/mod_negotiation.c line=1336 column=35
a
ccept_r-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=178 column=11
l
evel >= : true=0, false=0
>
avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel) {
1360            avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched = : enter=0, leave=0
=
 avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel;
1361            avail : modules/mappers/mod_negotiation.c line=1336 column=54
a
vail-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars = : enter=0, leave=0
=
 3;
1362            return : pass=0
r
eturn 1;
1363        }
1364    }
1365
1366    return : pass=0
r
eturn OK;
1367}
1368
1369/* This code implements a piece of the tie-breaking algorithm between
1370 * variants of equal quality.  This piece is the treatment of variants
1371 * of the same base media type, but different levels.  What we want to
1372 * return is the variant at the highest level that the client explicitly
1373 * claimed to accept.
1374 *
1375 * If all the variants available are at a higher level than that, or if
1376 * the client didn't say anything specific about this media type at all
1377 * and these variants just got in on a wildcard, we prefer the lowest
1378 * level, on grounds that that's the one that the client is least likely
1379 * to choke on.
1380 *
1381 * (This is all motivated by treatment of levels in HTML --- we only
1382 * want to give level 3 to browsers that explicitly ask for it; browsers
1383 * that don't, including HTTP/0.9 browsers that only get the implicit
1384 * "Accept: * / *" [space added to avoid confusing cpp --- no, that
1385 * syntax doesn't really work] should get HTML2 if available).
1386 *
1387 * (Note that this code only comes into play when we are choosing among
1388 * variants of equal quality, where the draft standard gives us a fair
1389 * bit of leeway about what to do.  It ain't specified by the standard;
1390 * rather, it is a choice made by this server about what to do in cases
1391 * where the standard does not specify a unique course of action).
1392 */
1393
1394static int level_cmp : call=0
l
evel_cmp(var_rec *var1, var_rec *var2)
1395{
1396    /* Levels are only comparable between matching media types */
1397
1398    if : true=0, false=0
i
f (var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>is_pseudo_html : modules/mappers/mod_negotiation.c line=231 column=9
i
s_pseudo_html && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>is_pseudo_html : modules/mappers/mod_negotiation.c line=231 column=9
i
s_pseudo_html) {
1399        return : pass=0
r
eturn 0;
1400    }
1401
1402    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>is_pseudo_html : modules/mappers/mod_negotiation.c line=231 column=9
i
s_pseudo_html && : 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(var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type)) {
1403        return : pass=0
r
eturn 0;
1404    }
1405    /* The result of the above if statements is that, if we get to
1406     * here, both variants have the same mime_type or both are
1407     * pseudo-html.
1408     */
1409
1410    /* Take highest level that matched, if either did match. */
1411
1412    if : true=0, false=0
i
f (var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched > : true=0, false=0
>
 var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched) {
1413        return : pass=0
r
eturn 1;
1414    }
1415    if : true=0, false=0
i
f (var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched < : true=0, false=0
<
 var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>level_matched : modules/mappers/mod_negotiation.c line=237 column=11
l
evel_matched) {
1416        return : pass=0
r
eturn -1;
1417    }
1418
1419    /* Neither matched.  Take lowest level, if there's a difference. */
1420
1421    if : true=0, false=0
i
f (var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel < : true=0, false=0
<
 var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel) {
1422        return : pass=0
r
eturn 1;
1423    }
1424    if : true=0, false=0
i
f (var1 : modules/mappers/mod_negotiation.c line=1394 column=31
v
ar1-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel > : true=0, false=0
>
 var2 : modules/mappers/mod_negotiation.c line=1394 column=46
v
ar2-> : enter=0, leave=0
-
>level : modules/mappers/mod_negotiation.c line=228 column=11
l
evel) {
1425        return : pass=0
r
eturn -1;
1426    }
1427
1428    /* Tied */
1429
1430    return : pass=0
r
eturn 0;
1431}
1432
1433/* Finding languages.  The main entry point is set_language_quality()
1434 * which is called for each variant. It sets two elements in the
1435 * variant record:
1436 *    language_quality  - the 'q' value of the 'best' matching language
1437 *                        from Accept-Language: header (HTTP/1.1)
1438 *    lang_index    -     Non-negotiated language priority, using
1439 *                        position of language on the Accept-Language:
1440 *                        header, if present, else LanguagePriority
1441 *                        directive order.
1442 *
1443 * When we do the variant checking for best variant, we use language
1444 * quality first, and if a tie, language_index next (this only applies
1445 * when _not_ using the RVSA/1.0 algorithm). If using the RVSA/1.0
1446 * algorithm, lang_index is never used.
1447 *
1448 * set_language_quality() calls find_lang_index() and find_default_index()
1449 * to set lang_index.
1450 */
1451
1452static int find_lang_index : call=0
f
ind_lang_index(apr_array_header_t *accept_langs, char *lang)
1453{
1454    const char **alang;
1455    int i;
1456
1457    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
lang : modules/mappers/mod_negotiation.c line=1452 column=68
l
ang || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
accept_langs : modules/mappers/mod_negotiation.c line=1452 column=48
a
ccept_langs) {
1458        return : pass=0
r
eturn -1;
1459    }
1460
1461    alang : modules/mappers/mod_negotiation.c line=1454 column=18
a
lang = : pass=0
=
 (const char **) accept_langs : modules/mappers/mod_negotiation.c line=1452 column=48
a
ccept_langs-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1462
1463    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=1455 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=1455 column=9
i
 < : true=0, false=0
<
 accept_langs : modules/mappers/mod_negotiation.c line=1452 column=48
a
ccept_langs-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=1455 column=9
i
) {
1464        if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(lang : modules/mappers/mod_negotiation.c line=1452 column=68
l
ang, * dereference : enter=0, leave=0
*
alang : modules/mappers/mod_negotiation.c line=1454 column=18
a
lang, strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(* dereference : enter=0, leave=0
*
alang : modules/mappers/mod_negotiation.c line=1454 column=18
a
lang))) {
1465            return : pass=0
r
eturn i : modules/mappers/mod_negotiation.c line=1455 column=9
i
;
1466        }
1467        alang : modules/mappers/mod_negotiation.c line=1454 column=18
a
lang += : pass=0
+
= (accept_langs : modules/mappers/mod_negotiation.c line=1452 column=48
a
ccept_langs-> : enter=0, leave=0
-
>elt_size : /usr/include/apr-1/apr_tables.h line=56 column=9 elt_size / : pass=0
/
 sizeof(char*));
1468    }
1469
1470    return : pass=0
r
eturn -1;
1471}
1472
1473/* set_default_lang_quality() sets the quality we apply to variants
1474 * which have no language assigned to them. If none of the variants
1475 * have a language, we are not negotiating on language, so all are
1476 * acceptable, and we set the default q value to 1.0. However if
1477 * some of the variants have languages, we set this default to 0.0001.
1478 * The value of this default will be applied to all variants with
1479 * no explicit language -- which will have the effect of making them
1480 * acceptable, but only if no variants with an explicit language
1481 * are acceptable. The default q value set here is assigned to variants
1482 * with no language type in set_language_quality().
1483 *
1484 * Note that if using the RVSA/1.0 algorithm, we don't use this
1485 * fiddle.
1486 */
1487
1488static void set_default_lang_quality : call=0
s
et_default_lang_quality(negotiation_state *neg)
1489{
1490    var_rec *avail_recs = (var_rec *) neg : modules/mappers/mod_negotiation.c line=1488 column=57
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1491    int j;
1492
1493    if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1488 column=57
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers) {
1494        for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=1491 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=1491 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=1488 column=57
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=1491 column=9
j
) {
1495            var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=1490 column=14
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=1491 column=9
j
];
1496            if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=1495 column=22
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages && : true=0, false=0
&
&
1497                variant : modules/mappers/mod_negotiation.c line=1495 column=22
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languagesMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
1498                neg : modules/mappers/mod_negotiation.c line=1488 column=57
n
eg-> : enter=0, leave=0
-
>default_lang_quality : modules/mappers/mod_negotiation.c line=252 column=11
d
efault_lang_quality = : enter=0, leave=0
=
 0.0001f;
1499                return : pass=0
r
eturn;
1500            }
1501        }
1502    }
1503
1504    neg : modules/mappers/mod_negotiation.c line=1488 column=57
n
eg-> : enter=0, leave=0
-
>default_lang_quality : modules/mappers/mod_negotiation.c line=252 column=11
d
efault_lang_quality = : enter=0, leave=0
=
 1.0f;
1505}
1506
1507/* Set the language_quality value in the variant record. Also
1508 * assigns lang_index for ForceLanguagePriority.
1509 *
1510 * To find the language_quality value, we look for the 'q' value
1511 * of the 'best' matching language on the Accept-Language
1512 * header. The 'best' match is the language on Accept-Language
1513 * header which matches the language of this variant either fully,
1514 * or as far as the prefix marker (-). If two or more languages
1515 * match, use the longest string from the Accept-Language header
1516 * (see HTTP/1.1 [14.4])
1517 *
1518 * When a variant has multiple languages, we find the 'best'
1519 * match for each variant language tag as above, then select the
1520 * one with the highest q value. Because both the accept-header
1521 * and variant can have multiple languages, we now have a hairy
1522 * loop-within-a-loop here.
1523 *
1524 * If the variant has no language and we have no Accept-Language
1525 * items, leave the quality at 1.0 and return.
1526 *
1527 * If the variant has no language, we use the default as set by
1528 * set_default_lang_quality() (1.0 if we are not negotiating on
1529 * language, 0.001 if we are).
1530 *
1531 * Following the setting of the language quality, we drop through to
1532 * set the old 'lang_index'. This is set based on either the order
1533 * of the languages on the Accept-Language header, or the
1534 * order on the LanguagePriority directive. This is only used
1535 * in the negotiation if the language qualities tie.
1536 */
1537
1538static void set_language_quality : call=0
s
et_language_quality(negotiation_state *neg, var_rec *variant)
1539{
1540    int forcepriority = neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>conf : modules/mappers/mod_negotiation.c line=249 column=21
c
onf-> : enter=0, leave=0
-
>forcelangpriority : modules/mappers/mod_negotiation.c line=49 column=9
f
orcelangpriority;
1541    if : true=0, false=0
i
f (forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority == : true=0, false=0
=
= FLP_UNDEF) {
1542        forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority = : pass=0
=
 FLP_DEFAULT;
1543    }
1544
1545    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
1546        /* This variant has no content-language, so use the default
1547         * quality factor for variants with no content-language
1548         * (previously set by set_default_lang_quality()).
1549         * Leave the factor alone (it remains at 1.0) when we may not fiddle
1550         * with the headers.
1551         */
1552        if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers) {
1553            variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality = : enter=0, leave=0
=
 neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>default_lang_quality : modules/mappers/mod_negotiation.c line=252 column=11
d
efault_lang_quality;
1554        }
1555        if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>accept_langs : modules/mappers/mod_negotiation.c line=260 column=25
a
ccept_langs) {
1556            return : pass=0
r
eturn;             /* no accept-language header */
1557        }
1558        return : pass=0
r
eturn;
1559    }
1560    else {
1561        /* Variant has one (or more) languages.  Look for the best
1562         * match. We do this by going through each language on the
1563         * variant description looking for a match on the
1564         * Accept-Language header. The best match is the longest
1565         * matching language on the header. The final result is the
1566         * best q value from all the languages on the variant
1567         * description.
1568         */
1569
1570        if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>accept_langs : modules/mappers/mod_negotiation.c line=260 column=25
a
ccept_langs) {
1571            /* no accept-language header makes the variant indefinite */
1572            variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1573        }
1574        else {    /* There is an accept-language with 0 or more items */
1575            accept_rec *accs = (accept_rec *) neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>accept_langs : modules/mappers/mod_negotiation.c line=260 column=25
a
ccept_langs-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1576            accept_rec *best = NULL, *star = NULL;
1577            accept_rec *bestthistag;
1578            char *lang, *p;
1579            float fiddle_q = 0.0f;
1580            int any_match_on_star = 0;
1581            int i, j;
1582            apr_size_t alen, longest_lang_range_len;
1583
1584            for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=1581 column=20
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=1581 column=20
j
 < : true=0, false=0
<
 variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=1581 column=20
j
) {
1585                p : modules/mappers/mod_negotiation.c line=1578 column=26
p
 = : pass=0
=
 NULL;
1586                bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag = : pass=0
=
 NULL;
1587                longest_lang_range_len : modules/mappers/mod_negotiation.c line=1582 column=30
l
ongest_lang_range_len = : pass=0
=
 0;
1588                alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len = : pass=0
=
 0;
1589
1590                /* lang is the variant's language-tag, which is the one
1591                 * we are allowed to use the prefix of in HTTP/1.1
1592                 */
1593                lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang = : pass=0
=
 ((char **) (variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts))[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=1581 column=20
j
];
1594
1595                /* now find the best (i.e. longest) matching
1596                 * Accept-Language header language. We put the best match
1597                 * for this tag in bestthistag. We cannot update the
1598                 * overall best (based on q value) because the best match
1599                 * for this tag is the longest language item on the accept
1600                 * header, not necessarily the highest q.
1601                 */
1602                for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=1581 column=17
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=1581 column=17
i
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>accept_langs : modules/mappers/mod_negotiation.c line=260 column=25
a
ccept_langs-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=1581 column=17
i
) {
1603                    if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, "*")) {
1604                        if : true=0, false=0
i
f (! : true=0, false=0
!
star : modules/mappers/mod_negotiation.c line=1576 column=39
s
tar) {
1605                            star : modules/mappers/mod_negotiation.c line=1576 column=39
s
tar = : pass=0
=
 &accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
];
1606                        }
1607                        continue : pass=0
c
ontinue;
1608                    }
1609                    /* Find language. We match if either the variant
1610                     * language tag exactly matches the language range
1611                     * from the accept header, or a prefix of the variant
1612                     * language tag up to a '-' character matches the
1613                     * whole of the language range in the Accept-Language
1614                     * header.  Note that HTTP/1.x allows any number of
1615                     * '-' characters in a tag or range, currently only
1616                     * tags with zero or one '-' characters are defined
1617                     * for general use (see rfc1766).
1618                     *
1619                     * We only use language range in the Accept-Language
1620                     * header the best match for the variant language tag
1621                     * if it is longer than the previous best match.
1622                     */
1623
1624                    alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len = : pass=0
=
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame);
1625
1626                    if : true=0, false=0
i
f ((strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang) >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len) && : true=0, false=0
&
&
1627                        ! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang, accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len) && : true=0, false=0
&
&
1628                        ((lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang[] : enter=0, leave=0
[
alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0) || : true=0, false=0
|
| (lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang[] : enter=0, leave=0
[
alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '-')) ) {
1629
1630                        if : true=0, false=0
i
f (alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len > : true=0, false=0
>
 longest_lang_range_len : modules/mappers/mod_negotiation.c line=1582 column=30
l
ongest_lang_range_len) {
1631                            longest_lang_range_len : modules/mappers/mod_negotiation.c line=1582 column=30
l
ongest_lang_range_len = : pass=0
=
 alen : modules/mappers/mod_negotiation.c line=1582 column=24
a
len;
1632                            bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag = : pass=0
=
 &accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
];
1633                        }
1634                    }
1635
1636                    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers) {
1637                        /* The next bit is a fiddle. Some browsers might
1638                         * be configured to send more specific language
1639                         * ranges than desirable. For example, an
1640                         * Accept-Language of en-US should never match
1641                         * variants with languages en or en-GB. But US
1642                         * English speakers might pick en-US as their
1643                         * language choice.  So this fiddle checks if the
1644                         * language range has a prefix, and if so, it
1645                         * matches variants which match that prefix with a
1646                         * priority of 0.001. So a request for en-US would
1647                         * match variants of types en and en-GB, but at
1648                         * much lower priority than matches of en-US
1649                         * directly, or of any other language listed on
1650                         * the Accept-Language header. Note that this
1651                         * fiddle does not handle multi-level prefixes.
1652                         */
1653                        if : true=0, false=0
i
f ((p : modules/mappers/mod_negotiation.c line=1578 column=26
p
 = : pass=0
=
 strchr : enter=0, leave=0

strchr : /usr/include/string.h line=235 column=14
s
trchr(accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, '-'))) {
1654                            int plen = p : modules/mappers/mod_negotiation.c line=1578 column=26
p
 - : pass=0
-
 accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame;
1655
1656                            if : true=0, false=0
i
f (! : true=0, false=0
!
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(lang : modules/mappers/mod_negotiation.c line=1578 column=19
l
ang, accs : modules/mappers/mod_negotiation.c line=1575 column=25
a
ccs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1581 column=17
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, plen : modules/mappers/mod_negotiation.c line=1654 column=33
p
len)) {
1657                                fiddle_q : modules/mappers/mod_negotiation.c line=1579 column=19
f
iddle_q = : pass=0
=
 0.001f;
1658                            }
1659                        }
1660                    }
1661                }
1662                /* Finished looking at Accept-Language headers, the best
1663                 * (longest) match is in bestthistag, or NULL if no match
1664                 */
1665                if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est || : true=0, false=0
|
|
1666                    (MC/DC independently affect : true=0, false=0

bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
bTF
estthistag && : true=0, false=0
&
bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality)) {
1667                    best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est = : pass=0
=
 bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag;
1668                }
1669
1670                /* See if the tag matches on a * in the Accept-Language
1671                 * header. If so, record this fact for later use
1672                 */
1673                if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
bestthistag : modules/mappers/mod_negotiation.c line=1577 column=25
b
estthistag && : true=0, false=0
&
MC/DC independently affect : true=0, false=0

star : modules/mappers/mod_negotiation.c line=1576 column=39
sTF
tar) {
1674                    any_match_on_star : modules/mappers/mod_negotiation.c line=1580 column=17
a
ny_match_on_star = : pass=0
=
 1;
1675                }
1676            }
1677
1678            /* If one of the language tags of the variant matched on *, we
1679             * need to see if its q is better than that of any non-* match
1680             * on any other tag of the variant.  If so the * match takes
1681             * precedence and the overall match is not definite.
1682             */
1683            if : true=0, false=0
i
f ( MC/DC independently affect : true=0, false=0

any_match_on_star : modules/mappers/mod_negotiation.c line=1580 column=17
aTF
ny_match_on_star && : true=0, false=0
&
&
1684                ((MC/DC independently affect : true=0, false=0

best : modules/mappers/mod_negotiation.c line=1576 column=25
bTF
est && : true=0, false=0
&
star : modules/mappers/mod_negotiation.c line=1576 column=39
s
tar-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality) || : true=0, false=0
|
|
1685                 (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est)) ) {
1686                best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est = : pass=0
=
 star : modules/mappers/mod_negotiation.c line=1576 column=39
s
tar;
1687                variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1688            }
1689
1690            variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality = : enter=0, leave=0
=
 best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est conditional operator : true=0, false=0
?
 best : modules/mappers/mod_negotiation.c line=1576 column=25
b
est-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality : fiddle_q : modules/mappers/mod_negotiation.c line=1579 column=19
f
iddle_q;
1691        }
1692    }
1693
1694    /* Handle the ForceDefaultLanguage overrides, based on the best match
1695     * to LanguagePriority order.  The best match is the lowest index of
1696     * any LanguagePriority match.
1697     */
1698    if : true=0, false=0
i
f (((forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority & : pass=0
&
 FLP_PREFER)
1699             && : true=0, false=0
&
& (variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 0))
1700     || : true=0, false=0
|
| ((forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority & : pass=0
&
 FLP_FALLBACK)
1701             && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality))
1702    {
1703        int bestidx = -1;
1704        int j;
1705
1706        for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=1704 column=13
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=1704 column=13
j
 < : true=0, false=0
<
 variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=1704 column=13
j
)
1707        {
1708            /* lang is the variant's language-tag, which is the one
1709             * we are allowed to use the prefix of in HTTP/1.1
1710             */
1711            char *lang = ((char **) (variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts))[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=1704 column=13
j
];
1712            int idx = -1;
1713
1714            /* If we wish to fallback or
1715             * we use our own LanguagePriority index.
1716             */
1717            idx : modules/mappers/mod_negotiation.c line=1712 column=17
i
dx = : pass=0
=
 find_lang_index : enter=0, leave=0

find_lang_index : modules/mappers/mod_negotiation.c line=1452 column=12
f
ind_lang_index(neg : modules/mappers/mod_negotiation.c line=1538 column=53
n
eg-> : enter=0, leave=0
-
>conf : modules/mappers/mod_negotiation.c line=249 column=21
c
onf-> : enter=0, leave=0
-
>language_priority : modules/mappers/mod_negotiation.c line=50 column=25
l
anguage_priority, lang : modules/mappers/mod_negotiation.c line=1711 column=19
l
ang);
1718            if : true=0, false=0
i
f ((idx : modules/mappers/mod_negotiation.c line=1712 column=17
i
dx >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= 0) && : true=0, false=0
&
& ((bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= -1) || : true=0, false=0
|
| (idx : modules/mappers/mod_negotiation.c line=1712 column=17
i
dx < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx))) {
1719                bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx = : pass=0
=
 idx : modules/mappers/mod_negotiation.c line=1712 column=17
i
dx;
1720            }
1721        }
1722
1723        if : true=0, false=0
i
f (bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx >= : true=0, false=0
>
= 0) {
1724            if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality) {
1725                if : true=0, false=0
i
f (forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority & : pass=0
&
 FLP_PREFER) {
1726                    variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index = : enter=0, leave=0
=
 bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx;
1727                }
1728            }
1729            else {
1730                if : true=0, false=0
i
f (forcepriority : modules/mappers/mod_negotiation.c line=1540 column=9
f
orcepriority & : pass=0
&
 FLP_FALLBACK) {
1731                    variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index = : enter=0, leave=0
=
 bestidx : modules/mappers/mod_negotiation.c line=1703 column=13
b
estidx;
1732                    variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality = : enter=0, leave=0
=
 .0001f;
1733                    variant : modules/mappers/mod_negotiation.c line=1538 column=67
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1734                }
1735            }
1736        }
1737    }
1738    return : pass=0
r
eturn;
1739}
1740
1741/* Determining the content length --- if the map didn't tell us,
1742 * we have to do a stat() and remember for next time.
1743 */
1744
1745static apr_off_t find_content_length : call=0
f
ind_content_length(negotiation_state *neg, var_rec *variant)
1746{
1747    apr_finfo_t statb;
1748
1749    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes < : true=0, false=0
<
 0) {
1750        if : true=0, false=0
i
f (   variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req
1751            && : true=0, false=0
&
& (variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req-> : enter=0, leave=0
-
>finfo : include/httpd.h line=957 column=17
f
info.valid : /usr/include/apr-1/apr_file_info.h line=179 column=17 valid & : pass=0
&
 APR_FINFO_SIZE)) {
1752            variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req-> : 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;
1753        }
1754        else {
1755            char *fullname = ap_make_full_path : enter=0, leave=0

ap_make_full_path : include/httpd.h line=1600 column=20
a
p_make_full_path(neg : modules/mappers/mod_negotiation.c line=1745 column=57
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool, neg : modules/mappers/mod_negotiation.c line=1745 column=57
n
eg-> : enter=0, leave=0
-
>dir_name : modules/mappers/mod_negotiation.c line=250 column=11
d
ir_name,
1756                                               variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name);
1757
1758            if : true=0, false=0
i
f (apr_stat : enter=0, leave=0

apr_stat : /usr/include/apr-1/apr_file_info.h line=229 column=27
a
pr_stat(&statb : modules/mappers/mod_negotiation.c line=1747 column=17
s
tatb, fullname : modules/mappers/mod_negotiation.c line=1755 column=19
f
ullname,
1759                         APR_FINFO_SIZE, neg : modules/mappers/mod_negotiation.c line=1745 column=57
n
eg-> : enter=0, leave=0
-
>pool : modules/mappers/mod_negotiation.c line=247 column=17
p
ool) == : true=0, false=0
=
= APR_SUCCESS) {
1760                variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes = : enter=0, leave=0
=
 statb : modules/mappers/mod_negotiation.c line=1747 column=17
s
tatb.size : /usr/include/apr-1/apr_file_info.h line=198 column=15 size;
1761            }
1762        }
1763    }
1764
1765    return : pass=0
r
eturn variant : modules/mappers/mod_negotiation.c line=1745 column=71
v
ariant-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes;
1766}
1767
1768/* For a given variant, find the best matching Accept: header
1769 * and assign the Accept: header's quality value to the
1770 * mime_type_quality field of the variant, for later use in
1771 * determining the best matching variant.
1772 */
1773
1774static void set_accept_quality : call=0
s
et_accept_quality(negotiation_state *neg, var_rec *variant)
1775{
1776    int i;
1777    accept_rec *accept_recs;
1778    float q = 0.0f;
1779    int q_definite = 1;
1780
1781    /* if no Accept: header, leave quality alone (will
1782     * remain at the default value of 1)
1783     *
1784     * XXX: This if is currently never true because of the effect of
1785     * maybe_add_default_accepts().
1786     */
1787    if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts) {
1788        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type)
1789            variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1790        return : pass=0
r
eturn;
1791    }
1792
1793    accept_recs : modules/mappers/mod_negotiation.c line=1777 column=17
a
ccept_recs = : pass=0
=
 (accept_rec *) neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1794
1795    /*
1796     * Go through each of the ranges on the Accept: header,
1797     * looking for the 'best' match with this variant's
1798     * content-type. We use the best match's quality
1799     * value (from the Accept: header) for this variant's
1800     * mime_type_quality field.
1801     *
1802     * The best match is determined like this:
1803     *    type/type is better than type/ * is better than * / *
1804     *    if match is type/type, use the level mime param if available
1805     */
1806    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=1776 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=1776 column=9
i
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>accepts : modules/mappers/mod_negotiation.c line=257 column=25
a
ccepts-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=1776 column=9
i
) {
1807
1808        accept_rec *type = &accept_recs : modules/mappers/mod_negotiation.c line=1777 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1776 column=9
i
];
1809        int prev_mime_stars;
1810
1811        prev_mime_stars : modules/mappers/mod_negotiation.c line=1809 column=13
p
rev_mime_stars = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars;
1812
1813        if : true=0, false=0
i
f (! : true=0, false=0
!
mime_match : enter=0, leave=0

mime_match : modules/mappers/mod_negotiation.c line=1336 column=12
m
ime_match(type : modules/mappers/mod_negotiation.c line=1808 column=21
t
ype, variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant)) {
1814            continue : pass=0
c
ontinue;           /* didn't match the content type at all */
1815        }
1816        else {
1817            /* did match - see if there were less or more stars than
1818             * in previous match
1819             */
1820            if : true=0, false=0
i
f (prev_mime_stars : modules/mappers/mod_negotiation.c line=1809 column=13
p
rev_mime_stars == : true=0, false=0
=
variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars) {
1821                continue : pass=0
c
ontinue;       /* more stars => not as good a match */
1822            }
1823        }
1824
1825        /* If we are allowed to mess with the q-values
1826         * and have no explicit q= parameters in the accept header,
1827         * make wildcards very low, so we have a low chance
1828         * of ending up with them if there's something better.
1829         */
1830
1831        if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>accept_q : modules/mappers/mod_negotiation.c line=251 column=9
a
ccept_q && : true=0, false=0
&
&
1832            variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 1) {
1833            q : modules/mappers/mod_negotiation.c line=1778 column=11
q
 = : pass=0
=
 0.01f;
1834        }
1835        else if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
neg : modules/mappers/mod_negotiation.c line=1774 column=51
n
eg-> : enter=0, leave=0
-
>accept_q : modules/mappers/mod_negotiation.c line=251 column=9
a
ccept_q && : true=0, false=0
&
&
1836                 variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 2) {
1837            q : modules/mappers/mod_negotiation.c line=1778 column=11
q
 = : pass=0
=
 0.02f;
1838        }
1839        else {
1840            q : modules/mappers/mod_negotiation.c line=1778 column=11
q
 = : pass=0
=
 type : modules/mappers/mod_negotiation.c line=1808 column=21
t
ype-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
1841        }
1842
1843        q_definite : modules/mappers/mod_negotiation.c line=1779 column=9
q
_definite = : pass=0
=
 (variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_stars : modules/mappers/mod_negotiation.c line=238 column=9
m
ime_stars == : true=0, false=0
=
= 3);
1844    }
1845    variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>mime_type_quality : modules/mappers/mod_negotiation.c line=224 column=11
m
ime_type_quality = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=1778 column=11
q
;
1846    variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=1774 column=65
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite && : true=0, false=0
&
MC/DC independently affect : true=0, false=0

q_definite : modules/mappers/mod_negotiation.c line=1779 column=9
qTF
_definite;
1847
1848}
1849
1850/* For a given variant, find the 'q' value of the charset given
1851 * on the Accept-Charset line. If no charsets are listed,
1852 * assume value of '1'.
1853 */
1854static void set_charset_quality : call=0
s
et_charset_quality(negotiation_state *neg, var_rec *variant)
1855{
1856    int i;
1857    accept_rec *accept_recs;
1858    const char *charset = variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset;
1859    accept_rec *star = NULL;
1860
1861    /* if no Accept-Charset: header, leave quality alone (will
1862     * remain at the default value of 1)
1863     */
1864    if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1854 column=52
n
eg-> : enter=0, leave=0
-
>accept_charsets : modules/mappers/mod_negotiation.c line=259 column=25
a
ccept_charsets) {
1865        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

charset : modules/mappers/mod_negotiation.c line=1858 column=17
cTF
harset && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset)
1866            variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1867        return : pass=0
r
eturn;
1868    }
1869
1870    accept_recs : modules/mappers/mod_negotiation.c line=1857 column=17
a
ccept_recs = : pass=0
=
 (accept_rec *) neg : modules/mappers/mod_negotiation.c line=1854 column=52
n
eg-> : enter=0, leave=0
-
>accept_charsets : modules/mappers/mod_negotiation.c line=259 column=25
a
ccept_charsets-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1871
1872    if : true=0, false=0
i
f (charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= NULL || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
* dereference : enter=0, leave=0
*
charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset) {
1873        /* Charset of variant not known */
1874
1875        /* if not a text / * type, leave quality alone */
1876        if : true=0, false=0
i
f (! : true=0, false=0
!
(! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
s
trncmp(variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, "text/", 5)
1877              || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, INCLUDES_MAGIC_TYPE)
1878              || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, INCLUDES_MAGIC_TYPE3)
1879              ))
1880            return : pass=0
r
eturn;
1881
1882        /* Don't go guessing if we are in strict header mode,
1883         * e.g. when running the rvsa, as any guess won't be reflected
1884         * in the variant list or content-location headers.
1885         */
1886        if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=1854 column=52
n
eg-> : enter=0, leave=0
-
>dont_fiddle_headers : modules/mappers/mod_negotiation.c line=268 column=9
d
ont_fiddle_headers)
1887            return : pass=0
r
eturn;
1888
1889        charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset = : pass=0
=
 "iso-8859-1"; /* The default charset for HTTP text types */
1890    }
1891
1892    /*
1893     * Go through each of the items on the Accept-Charset header,
1894     * looking for a match with this variant's charset. If none
1895     * match, charset is unacceptable, so set quality to 0.
1896     */
1897    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=1856 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=1856 column=9
i
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=1854 column=52
n
eg-> : enter=0, leave=0
-
>accept_charsets : modules/mappers/mod_negotiation.c line=259 column=25
a
ccept_charsets-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=1856 column=9
i
) {
1898
1899        accept_rec *type = &accept_recs : modules/mappers/mod_negotiation.c line=1857 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1856 column=9
i
];
1900
1901        if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(type : modules/mappers/mod_negotiation.c line=1899 column=21
t
ype-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset)) {
1902            variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality = : enter=0, leave=0
=
 type : modules/mappers/mod_negotiation.c line=1899 column=21
t
ype-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
1903            return : pass=0
r
eturn;
1904        }
1905        else if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(type : modules/mappers/mod_negotiation.c line=1899 column=21
t
ype-> : enter=0, leave=0
-
>name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame, "*") == : true=0, false=0
=
= 0) {
1906            star : modules/mappers/mod_negotiation.c line=1859 column=17
s
tar = : pass=0
=
 type : modules/mappers/mod_negotiation.c line=1899 column=21
t
ype;
1907        }
1908    }
1909    /* No explicit match */
1910    if : true=0, false=0
i
f (star : modules/mappers/mod_negotiation.c line=1859 column=17
s
tar) {
1911        variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality = : enter=0, leave=0
=
 star : modules/mappers/mod_negotiation.c line=1859 column=17
s
tar-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
1912        variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 0;
1913        return : pass=0
r
eturn;
1914    }
1915    /* If this variant is in charset iso-8859-1, the default is 1.0 */
1916    if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(charset : modules/mappers/mod_negotiation.c line=1858 column=17
c
harset, "iso-8859-1") == : true=0, false=0
=
= 0) {
1917        variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality = : enter=0, leave=0
=
 1.0f;
1918    }
1919    else {
1920        variant : modules/mappers/mod_negotiation.c line=1854 column=66
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality = : enter=0, leave=0
=
 0.0f;
1921    }
1922}
1923
1924
1925/* is_identity_encoding is included for back-compat, but does anyone
1926 * use 7bit, 8bin or binary in their var files??
1927 */
1928
1929static int is_identity_encoding : call=0
i
s_identity_encoding(const char *enc)
1930{
1931    return : pass=0
r
eturn (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
enc : modules/mappers/mod_negotiation.c line=1929 column=45
e
nc || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
enc : modules/mappers/mod_negotiation.c line=1929 column=45
e
nc[] : enter=0, leave=0
[
0] || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(enc : modules/mappers/mod_negotiation.c line=1929 column=45
e
nc, "7bit") || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(enc : modules/mappers/mod_negotiation.c line=1929 column=45
e
nc, "8bit")
1932            || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(enc : modules/mappers/mod_negotiation.c line=1929 column=45
e
nc, "binary"));
1933}
1934
1935/*
1936 * set_encoding_quality determines whether the encoding for a particular
1937 * variant is acceptable for the user-agent.
1938 *
1939 * The rules for encoding are that if the user-agent does not supply
1940 * any Accept-Encoding header, then all encodings are allowed but a
1941 * variant with no encoding should be preferred.
1942 * If there is an empty Accept-Encoding header, then no encodings are
1943 * acceptable. If there is a non-empty Accept-Encoding header, then
1944 * any of the listed encodings are acceptable, as well as no encoding
1945 * unless the "identity" encoding is specifically excluded.
1946 */
1947static void set_encoding_quality : call=0
s
et_encoding_quality(negotiation_state *neg, var_rec *variant)
1948{
1949    accept_rec *accept_recs;
1950    const char *enc = variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding;
1951    accept_rec *star = NULL;
1952    float value_if_not_found = 0.0f;
1953    int i;
1954
1955    if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=1947 column=53
n
eg-> : enter=0, leave=0
-
>accept_encodings : modules/mappers/mod_negotiation.c line=258 column=25
a
ccept_encodings) {
1956        /* We had no Accept-Encoding header, assume that all
1957         * encodings are acceptable with a low quality,
1958         * but we prefer no encoding if available.
1959         */
1960        if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
is_identity_encoding : enter=0, leave=0

is_identity_encoding : modules/mappers/mod_negotiation.c line=1929 column=12
iTF
s_identity_encoding(enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc))
1961            variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 1.0f;
1962        else
1963            variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 0.5f;
1964
1965        return : pass=0
r
eturn;
1966    }
1967
1968    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
is_identity_encoding : enter=0, leave=0

is_identity_encoding : modules/mappers/mod_negotiation.c line=1929 column=12
iTF
s_identity_encoding(enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc)) {
1969        enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc = : pass=0
=
 "identity";
1970        value_if_not_found : modules/mappers/mod_negotiation.c line=1952 column=11
v
alue_if_not_found = : pass=0
=
 0.0001f;
1971    }
1972
1973    accept_recs : modules/mappers/mod_negotiation.c line=1949 column=17
a
ccept_recs = : pass=0
=
 (accept_rec *) neg : modules/mappers/mod_negotiation.c line=1947 column=53
n
eg-> : enter=0, leave=0
-
>accept_encodings : modules/mappers/mod_negotiation.c line=258 column=25
a
ccept_encodings-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
1974
1975    /* Go through each of the encodings on the Accept-Encoding: header,
1976     * looking for a match with our encoding. x- prefixes are ignored.
1977     */
1978    if : true=0, false=0
i
f (enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'x' && : true=0, false=0
&
enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '-') {
1979        enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc += : pass=0
+
= 2;
1980    }
1981    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=1953 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=1953 column=9
i
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=1947 column=53
n
eg-> : enter=0, leave=0
-
>accept_encodings : modules/mappers/mod_negotiation.c line=258 column=25
a
ccept_encodings-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=1953 column=9
i
) {
1982
1983        char *name = accept_recs : modules/mappers/mod_negotiation.c line=1949 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1953 column=9
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame;
1984
1985        if : true=0, false=0
i
f (name : modules/mappers/mod_negotiation.c line=1983 column=15
n
ame[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'x' && : true=0, false=0
&
name : modules/mappers/mod_negotiation.c line=1983 column=15
n
ame[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '-') {
1986            name : modules/mappers/mod_negotiation.c line=1983 column=15
n
ame += : pass=0
+
= 2;
1987        }
1988
1989        if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(name : modules/mappers/mod_negotiation.c line=1983 column=15
n
ame, enc : modules/mappers/mod_negotiation.c line=1950 column=17
e
nc)) {
1990            variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 accept_recs : modules/mappers/mod_negotiation.c line=1949 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1953 column=9
i
].quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
1991            return : pass=0
r
eturn;
1992        }
1993
1994        if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(name : modules/mappers/mod_negotiation.c line=1983 column=15
n
ame, "*") == : true=0, false=0
=
= 0) {
1995            star : modules/mappers/mod_negotiation.c line=1951 column=17
s
tar = : pass=0
=
 &accept_recs : modules/mappers/mod_negotiation.c line=1949 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=1953 column=9
i
];
1996        }
1997
1998    }
1999    /* No explicit match */
2000    if : true=0, false=0
i
f (star : modules/mappers/mod_negotiation.c line=1951 column=17
s
tar) {
2001        variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 star : modules/mappers/mod_negotiation.c line=1951 column=17
s
tar-> : enter=0, leave=0
-
>quality : modules/mappers/mod_negotiation.c line=177 column=11
q
uality;
2002        return : pass=0
r
eturn;
2003    }
2004
2005    /* Encoding not found on Accept-Encoding: header, so it is
2006     * _not_ acceptable unless it is the identity (no encoding)
2007     */
2008    variant : modules/mappers/mod_negotiation.c line=1947 column=67
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality = : enter=0, leave=0
=
 value_if_not_found : modules/mappers/mod_negotiation.c line=1952 column=11
v
alue_if_not_found;
2009}
2010
2011/*************************************************************
2012 * Possible results of the variant selection algorithm
2013 */
2014enum algorithm_results {
2015    alg_choice = 1,              /* choose variant */
2016    alg_list                     /* list variants */
2017};
2018
2019/* Below is the 'best_match' function. It returns an int, which has
2020 * one of the two values alg_choice or alg_list, which give the result
2021 * of the variant selection algorithm.  alg_list means that no best
2022 * variant was found by the algorithm, alg_choice means that a best
2023 * variant was found and should be returned.  The list/choice
2024 * terminology comes from TCN (rfc2295), but is used in a more generic
2025 * way here.  The best variant is returned in *pbest. best_match has
2026 * two possible algorithms for determining the best variant: the
2027 * RVSA/1.0 algorithm (from RFC2296), and the standard Apache
2028 * algorithm. These are split out into separate functions
2029 * (is_variant_better_rvsa() and is_variant_better()).  Selection of
2030 * one is through the neg->use_rvsa flag.
2031 *
2032 * The call to best_match also creates full information, including
2033 * language, charset, etc quality for _every_ variant. This is needed
2034 * for generating a correct Vary header, and can be used for the
2035 * Alternates header, the human-readable list responses and 406 errors.
2036 */
2037
2038/* Firstly, the RVSA/1.0 (HTTP Remote Variant Selection Algorithm
2039 * v1.0) from rfc2296.  This is the algorithm that goes together with
2040 * transparent content negotiation (TCN).
2041 */
2042static int is_variant_better_rvsa : call=0
i
s_variant_better_rvsa(negotiation_state *neg, var_rec *variant,
2043                                  var_rec *best, float *p_bestq)
2044{
2045    float bestq = * dereference : enter=0, leave=0
*
p_bestq : modules/mappers/mod_negotiation.c line=2043 column=57
p
_bestq, q;
2046
2047    /* TCN does not cover negotiation on content-encoding.  For now,
2048     * we ignore the encoding unless it was explicitly excluded.
2049     */
2050    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality == : true=0, false=0
=
= 0.0f)
2051        return : pass=0
r
eturn 0;
2052
2053    q : modules/mappers/mod_negotiation.c line=2045 column=29
q
 = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>mime_type_quality : modules/mappers/mod_negotiation.c line=224 column=11
m
ime_type_quality * : pass=0
*
2054        variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality * : pass=0
*
2055        variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality * : pass=0
*
2056        variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality;
2057
2058   /* RFC 2296 calls for the result to be rounded to 5 decimal places,
2059    * but we don't do that because it serves no useful purpose other
2060    * than to ensure that a remote algorithm operates on the same
2061    * precision as ours.  That is silly, since what we obviously want
2062    * is for the algorithm to operate on the best available precision
2063    * regardless of who runs it.  Since the above calculation may
2064    * result in significant variance at 1e-12, rounding would be bogus.
2065    */
2066
2067#ifdef NEG_DEBUG
2068    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
2069           "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
2070           "mimeq=%1.3f langq=%1.3f charq=%1.3f encq=%1.3f "
2071           "q=%1.5f definite=%d",
2072            (variant->file_name ? variant->file_name : ""),
2073            (variant->mime_type ? variant->mime_type : ""),
2074            (variant->content_languages
2075             ? apr_array_pstrcat(neg->pool, variant->content_languages, ',')
2076             : ""),
2077            variant->source_quality,
2078            variant->mime_type_quality,
2079            variant->lang_quality,
2080            variant->charset_quality,
2081            variant->encoding_quality,
2082            q,
2083            variant->definite);
2084#endif
2085
2086    if : true=0, false=0
i
f (q : modules/mappers/mod_negotiation.c line=2045 column=29
q
 <= : true=0, false=0
<
= 0.0f) {
2087        return : pass=0
r
eturn 0;
2088    }
2089    if : true=0, false=0
i
f (q : modules/mappers/mod_negotiation.c line=2045 column=29
q
 > : true=0, false=0
>
 bestq : modules/mappers/mod_negotiation.c line=2045 column=11
b
estq) {
2090        *p_bestq : modules/mappers/mod_negotiation.c line=2043 column=57
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2045 column=29
q
;
2091        return : pass=0
r
eturn 1;
2092    }
2093    if : true=0, false=0
i
f (q : modules/mappers/mod_negotiation.c line=2045 column=29
q
 == : true=0, false=0
=
bestq : modules/mappers/mod_negotiation.c line=2045 column=11
b
estq) {
2094        /* If the best variant's encoding is of lesser quality than
2095         * this variant, then we prefer this variant
2096         */
2097        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2042 column=68
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality > : true=0, false=0
>
 best : modules/mappers/mod_negotiation.c line=2043 column=44
b
est-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality) {
2098            *p_bestq : modules/mappers/mod_negotiation.c line=2043 column=57
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2045 column=29
q
;
2099            return : pass=0
r
eturn 1;
2100        }
2101    }
2102    return : pass=0
r
eturn 0;
2103}
2104
2105/* Negotiation algorithm as used by previous versions of Apache
2106 * (just about).
2107 */
2108
2109static int is_variant_better : call=0
i
s_variant_better(negotiation_state *neg, var_rec *variant,
2110                             var_rec *best, float *p_bestq)
2111{
2112    float bestq = * dereference : enter=0, leave=0
*
p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq, q;
2113    int levcmp;
2114
2115    /* For non-transparent negotiation, server can choose how
2116     * to handle the negotiation. We'll use the following in
2117     * order: content-type, language, content-type level, charset,
2118     * content encoding, content length.
2119     *
2120     * For each check, we have three possible outcomes:
2121     *   This variant is worse than current best: return 0
2122     *   This variant is better than the current best:
2123     *          assign this variant's q to *p_bestq, and return 1
2124     *   This variant is just as desirable as the current best:
2125     *          drop through to the next test.
2126     *
2127     * This code is written in this long-winded way to allow future
2128     * customisation, either by the addition of additional
2129     * checks, or to allow the order of the checks to be determined
2130     * by configuration options (e.g. we might prefer to check
2131     * language quality _before_ content type).
2132     */
2133
2134    /* First though, eliminate this variant if it is not
2135     * acceptable by type, charset, encoding or language.
2136     */
2137
2138#ifdef NEG_DEBUG
2139    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
2140           "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
2141           "mimeq=%1.3f langq=%1.3f langidx=%d charq=%1.3f encq=%1.3f ",
2142            (variant->file_name ? variant->file_name : ""),
2143            (variant->mime_type ? variant->mime_type : ""),
2144            (variant->content_languages
2145             ? apr_array_pstrcat(neg->pool, variant->content_languages, ',')
2146             : ""),
2147            variant->source_quality,
2148            variant->mime_type_quality,
2149            variant->lang_quality,
2150            variant->lang_index,
2151            variant->charset_quality,
2152            variant->encoding_quality);
2153#endif
2154
2155    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0f || : true=0, false=0
|
|
2156        variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0f || : true=0, false=0
|
|
2157        variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0f || : true=0, false=0
|
|
2158        variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0f || : true=0, false=0
|
|
2159        variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>mime_type_quality : modules/mappers/mod_negotiation.c line=224 column=11
m
ime_type_quality == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0f) {
2160        return : pass=0
r
eturn 0;               /* don't consider unacceptables */
2161    }
2162
2163    q : modules/mappers/mod_negotiation.c line=2112 column=29
q
 = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>mime_type_quality : modules/mappers/mod_negotiation.c line=224 column=11
m
ime_type_quality * : pass=0
*
 variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality;
2164    if : true=0, false=0
i
f (q : modules/mappers/mod_negotiation.c line=2112 column=29
q
 == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0.0 || : true=0, false=0
|
q : modules/mappers/mod_negotiation.c line=2112 column=29
q
 < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 bestq : modules/mappers/mod_negotiation.c line=2112 column=11
b
estq) {
2165        return : pass=0
r
eturn 0;
2166    }
2167    if : true=0, false=0
i
f (q : modules/mappers/mod_negotiation.c line=2112 column=29
q
 > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 bestq : modules/mappers/mod_negotiation.c line=2112 column=11
b
estq || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est) {
2168        *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2169        return : pass=0
r
eturn 1;
2170    }
2171
2172    /* language */
2173    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality < : true=0, false=0
<
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality) {
2174        return : pass=0
r
eturn 0;
2175    }
2176    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality > : true=0, false=0
>
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality) {
2177        *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2178        return : pass=0
r
eturn 1;
2179    }
2180
2181    /* if language qualities were equal, try the LanguagePriority stuff */
2182    if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= -1 && : true=0, false=0
&
&
2183        (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= -1 || : true=0, false=0
|
variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index)) {
2184        return : pass=0
r
eturn 0;
2185    }
2186    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= -1 && : true=0, false=0
&
&
2187        (best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= -1 || : true=0, false=0
|
variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>lang_index : modules/mappers/mod_negotiation.c line=230 column=9
l
ang_index)) {
2188        *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2189        return : pass=0
r
eturn 1;
2190    }
2191
2192    /* content-type level (sometimes used with text/html, though we
2193     * support it on other types too)
2194     */
2195    levcmp : modules/mappers/mod_negotiation.c line=2113 column=9
l
evcmp = : pass=0
=
 level_cmp : enter=0, leave=0

level_cmp : modules/mappers/mod_negotiation.c line=1394 column=12
l
evel_cmp(variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant, best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est);
2196    if : true=0, false=0
i
f (levcmp : modules/mappers/mod_negotiation.c line=2113 column=9
l
evcmp == : true=0, false=0
=
= -1) {
2197        return : pass=0
r
eturn 0;
2198    }
2199    if : true=0, false=0
i
f (levcmp : modules/mappers/mod_negotiation.c line=2113 column=9
l
evcmp == : true=0, false=0
=
= 1) {
2200        *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2201        return : pass=0
r
eturn 1;
2202    }
2203
2204    /* charset */
2205    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality < : true=0, false=0
<
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality) {
2206        return : pass=0
r
eturn 0;
2207    }
2208    /* If the best variant's charset is ISO-8859-1 and this variant has
2209     * the same charset quality, then we prefer this variant
2210     */
2211
2212    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>charset_quality : modules/mappers/mod_negotiation.c line=223 column=11
c
harset_quality || : true=0, false=0
|
|
2213        ((variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= NULL && : true=0, false=0
&
&
2214          * dereference : enter=0, leave=0
*
variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= '\0' && : true=0, false=0
&
&
2215          strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset, "iso-8859-1") != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= 0) && : true=0, false=0
&
&
2216         (best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= NULL || : true=0, false=0
|
|
2217          * dereference : enter=0, leave=0
*
best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '\0' || : true=0, false=0
|
|
2218          strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset, "iso-8859-1") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0))) {
2219        *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2220        return : pass=0
r
eturn 1;
2221    }
2222
2223    /* Prefer the highest value for encoding_quality.
2224     */
2225    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality < : true=0, false=0
<
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality) {
2226       return : pass=0
r
eturn 0;
2227    }
2228    if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality > : true=0, false=0
>
 best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est-> : enter=0, leave=0
-
>encoding_quality : modules/mappers/mod_negotiation.c line=222 column=11
e
ncoding_quality) {
2229       *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2230       return : pass=0
r
eturn 1;
2231    }
2232
2233    /* content length if all else equal */
2234    if : true=0, false=0
i
f (find_content_length : enter=0, leave=0

find_content_length : modules/mappers/mod_negotiation.c line=1745 column=18
f
ind_content_length(neg : modules/mappers/mod_negotiation.c line=2109 column=49
n
eg, variant : modules/mappers/mod_negotiation.c line=2109 column=63
v
ariant) >= : true=0, false=0
>
find_content_length : enter=0, leave=0

find_content_length : modules/mappers/mod_negotiation.c line=1745 column=18
f
ind_content_length(neg : modules/mappers/mod_negotiation.c line=2109 column=49
n
eg, best : modules/mappers/mod_negotiation.c line=2110 column=39
b
est)) {
2235        return : pass=0
r
eturn 0;
2236    }
2237
2238    /* ok, to get here means every thing turned out equal, except
2239     * we have a shorter content length, so use this variant
2240     */
2241    *p_bestq : modules/mappers/mod_negotiation.c line=2110 column=52
p
_bestq = : enter=0, leave=0
=
 q : modules/mappers/mod_negotiation.c line=2112 column=29
q
;
2242    return : pass=0
r
eturn 1;
2243}
2244
2245/* figure out, whether a variant is in a specific language
2246 * it returns also false, if the variant has no language.
2247 */
2248static int variant_has_language : call=0
v
ariant_has_language(var_rec *variant, const char *lang)
2249{
2250    int j, max;
2251
2252    /* fast exit */
2253    if : true=0, false=0
i
f (   ! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
lang : modules/mappers/mod_negotiation.c line=2248 column=63
l
ang
2254        || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant : modules/mappers/mod_negotiation.c line=2248 column=42
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages
2255        || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(max : modules/mappers/mod_negotiation.c line=2250 column=12
m
ax = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2248 column=42
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts)) {
2256        return : pass=0
r
eturn 0;
2257    }
2258
2259    for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=2250 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=2250 column=9
j
 < : true=0, false=0
<
 max : modules/mappers/mod_negotiation.c line=2250 column=12
m
ax; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=2250 column=9
j
) {
2260        if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(lang : modules/mappers/mod_negotiation.c line=2248 column=63
l
ang,
2261                    ((char **) (variant : modules/mappers/mod_negotiation.c line=2248 column=42
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts))[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=2250 column=9
j
])) {
2262            return : pass=0
r
eturn 1;
2263        }
2264    }
2265
2266    return : pass=0
r
eturn 0;
2267}
2268
2269/* check for environment variables 'no-gzip' and
2270 * 'gzip-only-text/html' to get a behaviour similiar
2271 * to mod_deflate
2272 */
2273static int discard_variant_by_env : call=0
d
iscard_variant_by_env(var_rec *variant, int discard)
2274{
2275    if : true=0, false=0
i
f (   MC/DC independently affect : true=0, false=0
is_identity_encoding : enter=0, leave=0

is_identity_encoding : modules/mappers/mod_negotiation.c line=1929 column=12
iTF
s_identity_encoding(variant : modules/mappers/mod_negotiation.c line=2273 column=44
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding)
2276        || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(variant : modules/mappers/mod_negotiation.c line=2273 column=44
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding, "identity")) {
2277        return : pass=0
r
eturn 0;
2278    }
2279
2280    return : pass=0
r
eturn (   (discard : modules/mappers/mod_negotiation.c line=2273 column=57
d
iscard == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= DISCARD_ALL_ENCODINGS)
2281            || : true=0, false=0
|
| (discard : modules/mappers/mod_negotiation.c line=2273 column=57
d
iscard == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= DISCARD_ALL_BUT_HTML
2282                && : true=0, false=0
&
& (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant : modules/mappers/mod_negotiation.c line=2273 column=44
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type
2283                    || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
strncmp : enter=0, leave=0

strncmp : /usr/include/string.h line=146 column=12
sTF
trncmp(variant : modules/mappers/mod_negotiation.c line=2273 column=44
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type, "text/html", 9))));
2284}
2285
2286static int best_match : call=0
b
est_match(negotiation_state *neg, var_rec **pbest)
2287{
2288    int j;
2289    var_rec *best;
2290    float bestq = 0.0f;
2291    enum algorithm_results algorithm_result;
2292    int may_discard = 0;
2293
2294    var_rec *avail_recs = (var_rec *) neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
2295
2296    /* fetch request dependent variables
2297     * prefer-language: prefer a certain language.
2298     */
2299    const char *preferred_language = 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(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
-> : enter=0, leave=0
-
>subprocess_env : include/httpd.h line=908 column=18
s
ubprocess_env,
2300                                                   "prefer-language");
2301
2302    /* no-gzip: do not send encoded documents */
2303    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(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
-> : enter=0, leave=0
-
>subprocess_env : include/httpd.h line=908 column=18
s
ubprocess_env, "no-gzip")) {
2304        may_discard : modules/mappers/mod_negotiation.c line=2292 column=9
m
ay_discard = : pass=0
=
 DISCARD_ALL_ENCODINGS;
2305    }
2306
2307    /* gzip-only-text/html: send encoded documents only
2308     * if they are text/html. (no-gzip has a higher priority).
2309     */
2310    else {
2311        const char *env_value = 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(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>r : modules/mappers/mod_negotiation.c line=248 column=18
r
-> : enter=0, leave=0
-
>subprocess_env : include/httpd.h line=908 column=18
s
ubprocess_env,
2312                                              "gzip-only-text/html");
2313
2314        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

env_value : modules/mappers/mod_negotiation.c line=2311 column=21
eTF
nv_value && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(env_value : modules/mappers/mod_negotiation.c line=2311 column=21
e
nv_value, "1")) {
2315            may_discard : modules/mappers/mod_negotiation.c line=2292 column=9
m
ay_discard = : pass=0
=
 DISCARD_ALL_BUT_HTML;
2316        }
2317    }
2318
2319    set_default_lang_quality : enter=0, leave=0

set_default_lang_quality : modules/mappers/mod_negotiation.c line=1488 column=13
s
et_default_lang_quality(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg);
2320
2321    /*
2322     * Find the 'best' variant
2323     * We run the loop possibly twice: if "prefer-language"
2324     * environment variable is set but we did not find an appropriate
2325     * best variant. In that case forget the preferred language and
2326     * negotiate over all variants.
2327     */
2328
2329    do {
2330        best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est = : pass=0
=
 NULL;
2331
2332        for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=2288 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=2288 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=2288 column=9
j
) {
2333            var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=2294 column=14
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=2288 column=9
j
];
2334
2335            /* if this variant is encoded somehow and there are special
2336             * variables set, we do not negotiate it. see above.
2337             */
2338            if : true=0, false=0
i
f (   MC/DC independently affect : true=0, false=0

may_discard : modules/mappers/mod_negotiation.c line=2292 column=9
mTF
ay_discard
2339                && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
discard_variant_by_env : enter=0, leave=0

discard_variant_by_env : modules/mappers/mod_negotiation.c line=2273 column=12
dTF
iscard_variant_by_env(variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant, may_discard : modules/mappers/mod_negotiation.c line=2292 column=9
m
ay_discard)) {
2340                continue : pass=0
c
ontinue;
2341            }
2342
2343            /* if a language is preferred, but the current variant
2344             * is not in that language, then drop it for now
2345             */
2346            if : true=0, false=0
i
f (   MC/DC independently affect : true=0, false=0

preferred_language : modules/mappers/mod_negotiation.c line=2299 column=17
pTF
referred_language
2347                && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
variant_has_language : enter=0, leave=0

variant_has_language : modules/mappers/mod_negotiation.c line=2248 column=12
v
ariant_has_language(variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant, preferred_language : modules/mappers/mod_negotiation.c line=2299 column=17
p
referred_language)) {
2348                continue : pass=0
c
ontinue;
2349            }
2350
2351            /* Find all the relevant 'quality' values from the
2352             * Accept... headers, and store in the variant.  This also
2353             * prepares for sending an Alternates header etc so we need to
2354             * do it even if we do not actually plan to find a best
2355             * variant.
2356             */
2357            set_accept_quality : enter=0, leave=0

set_accept_quality : modules/mappers/mod_negotiation.c line=1774 column=13
s
et_accept_quality(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant);
2358            /* accept the preferred language, even when it's not listed within
2359             * the Accept-Language header
2360             */
2361            if : true=0, false=0
i
f (preferred_language : modules/mappers/mod_negotiation.c line=2299 column=17
p
referred_language) {
2362                variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant-> : enter=0, leave=0
-
>lang_quality : modules/mappers/mod_negotiation.c line=221 column=11
l
ang_quality = : enter=0, leave=0
=
 1.0f;
2363                variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant-> : enter=0, leave=0
-
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite = : enter=0, leave=0
=
 1;
2364            }
2365            else {
2366                set_language_quality : enter=0, leave=0

set_language_quality : modules/mappers/mod_negotiation.c line=1538 column=13
s
et_language_quality(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant);
2367            }
2368            set_encoding_quality : enter=0, leave=0

set_encoding_quality : modules/mappers/mod_negotiation.c line=1947 column=13
s
et_encoding_quality(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant);
2369            set_charset_quality : enter=0, leave=0

set_charset_quality : modules/mappers/mod_negotiation.c line=1854 column=13
s
et_charset_quality(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant);
2370
2371            /* Only do variant selection if we may actually choose a
2372             * variant for the client
2373             */
2374            if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose) {
2375
2376                /* Now find out if this variant is better than the current
2377                 * best, either using the RVSA/1.0 algorithm, or Apache's
2378                 * internal server-driven algorithm. Presumably other
2379                 * server-driven algorithms are possible, and could be
2380                 * implemented here.
2381                 */
2382
2383                if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>use_rvsa : modules/mappers/mod_negotiation.c line=272 column=9
u
se_rvsa) {
2384                    if : true=0, false=0
i
f (is_variant_better_rvsa : enter=0, leave=0

is_variant_better_rvsa : modules/mappers/mod_negotiation.c line=2042 column=12
i
s_variant_better_rvsa(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant, best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est, &bestq : modules/mappers/mod_negotiation.c line=2290 column=11
b
estq)) {
2385                        best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant;
2386                    }
2387                }
2388                else {
2389                    if : true=0, false=0
i
f (is_variant_better : enter=0, leave=0

is_variant_better : modules/mappers/mod_negotiation.c line=2109 column=12
i
s_variant_better(neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg, variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant, best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est, &bestq : modules/mappers/mod_negotiation.c line=2290 column=11
b
estq)) {
2390                        best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2333 column=22
v
ariant;
2391                    }
2392                }
2393            }
2394        }
2395
2396        /* We now either have a best variant, or no best variant */
2397
2398        if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2286 column=42
n
eg-> : enter=0, leave=0
-
>use_rvsa : modules/mappers/mod_negotiation.c line=272 column=9
u
se_rvsa)    {
2399            /* calculate result for RVSA/1.0 algorithm:
2400             * only a choice response if the best variant has q>0
2401             * and is definite
2402             */
2403            algorithm_result : modules/mappers/mod_negotiation.c line=2291 column=28
a
lgorithm_result = : pass=0
=
 (MC/DC independently affect : true=0, false=0

best : modules/mappers/mod_negotiation.c line=2289 column=14
bTF
est && : true=0, false=0
&
best : modules/mappers/mod_negotiation.c line=2289 column=14
b
estMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>definite : modules/mappers/mod_negotiation.c line=239 column=9
d
efinite) && : true=0, false=0
&
& (bestq : modules/mappers/mod_negotiation.c line=2290 column=11
b
estq > : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
 0) conditional operator : true=0, false=0
?
2404                                alg_choice : modules/mappers/mod_negotiation.c line=2015 column=5
a
lg_choice : alg_list : modules/mappers/mod_negotiation.c line=2016 column=5
a
lg_list;
2405        }
2406        else {
2407            /* calculate result for Apache negotiation algorithm */
2408            algorithm_result : modules/mappers/mod_negotiation.c line=2291 column=28
a
lgorithm_result = : pass=0
=
 bestq : modules/mappers/mod_negotiation.c line=2290 column=11
b
estq > : true=0, false=0
>
 0 conditional operator : true=0, false=0
?
 alg_choice : modules/mappers/mod_negotiation.c line=2015 column=5
a
lg_choice : alg_list : modules/mappers/mod_negotiation.c line=2016 column=5
a
lg_list;
2409        }
2410
2411        /* run the loop again, if the "prefer-language" got no clear result */
2412        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

preferred_language : modules/mappers/mod_negotiation.c line=2299 column=17
pTF
referred_language && : true=0, false=0
&
& (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est || : true=0, false=0
|
algorithm_result : modules/mappers/mod_negotiation.c line=2291 column=28
a
lgorithm_result != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
alg_choice : modules/mappers/mod_negotiation.c line=2015 column=5
a
lg_choice)) {
2413            preferred_language : modules/mappers/mod_negotiation.c line=2299 column=17
p
referred_language = : pass=0
=
 NULL;
2414            continue : pass=0
c
ontinue;
2415        }
2416
2417        break : pass=0
b
reak;
2418    } while : true=0, false=0
w
hile (1);
2419
2420    /* Returning a choice response with a non-neighboring variant is a
2421     * protocol security error in TCN (see rfc2295).  We do *not*
2422     * verify here that the variant and URI are neighbors, even though
2423     * we may return alg_choice.  We depend on the environment (the
2424     * caller) to only declare the resource transparently negotiable if
2425     * all variants are neighbors.
2426     */
2427    *pbest : modules/mappers/mod_negotiation.c line=2286 column=57
p
best = : enter=0, leave=0
=
 best : modules/mappers/mod_negotiation.c line=2289 column=14
b
est;
2428    return : pass=0
r
eturn algorithm_result : modules/mappers/mod_negotiation.c line=2291 column=28
a
lgorithm_result;
2429}
2430
2431/* Sets response headers for a negotiated response.
2432 * neg->is_transparent determines whether a transparently negotiated
2433 * response or a plain `server driven negotiation' response is
2434 * created.   Applicable headers are Alternates, Vary, and TCN.
2435 *
2436 * The Vary header we create is sometimes longer than is required for
2437 * the correct caching of negotiated results by HTTP/1.1 caches.  For
2438 * example if we have 3 variants x.html, x.ps.en and x.ps.nl, and if
2439 * the Accept: header assigns a 0 quality to .ps, then the results of
2440 * the two server-side negotiation algorithms we currently implement
2441 * will never depend on Accept-Language so we could return `Vary:
2442 * negotiate, accept' instead of the longer 'Vary: negotiate, accept,
2443 * accept-language' which the code below will return.  A routine for
2444 * computing the exact minimal Vary header would be a huge pain to code
2445 * and maintain though, especially because we need to take all possible
2446 * twiddles in the server-side negotiation algorithms into account.
2447 */
2448static void set_neg_headers : call=0
s
et_neg_headers(request_rec *r, negotiation_state *neg,
2449                            int alg_result)
2450{
2451    apr_table_t *hdrs;
2452    var_rec *avail_recs = (var_rec *) neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
2453    const char *sample_type = NULL;
2454    const char *sample_language = NULL;
2455    const char *sample_encoding = NULL;
2456    const char *sample_charset = NULL;
2457    char *lang;
2458    char *qstr;
2459    apr_off_t len;
2460    apr_array_header_t *arr;
2461    int max_vlist_array = (neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts * : pass=0
*
 21);
2462    int first_variant = 1;
2463    int vary_by_type = 0;
2464    int vary_by_language = 0;
2465    int vary_by_charset = 0;
2466    int vary_by_encoding = 0;
2467    int j;
2468
2469    /* In order to avoid O(n^2) memory copies in building Alternates,
2470     * we preallocate a apr_table_t with the maximum substrings possible,
2471     * fill it with the variant list, and then concatenate the entire array.
2472     * Note that if you change the number of substrings pushed, you also
2473     * need to change the calculation of max_vlist_array above.
2474     */
2475    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates && : true=0, false=0
&
neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_varsMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts)
2476        arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr = : pass=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/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, max_vlist_array : modules/mappers/mod_negotiation.c line=2461 column=9
m
ax_vlist_array, sizeof(char *));
2477    else
2478        arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr = : pass=0
=
 NULL;
2479
2480    /* Put headers into err_headers_out, since send_http_header()
2481     * outputs both headers_out and err_headers_out.
2482     */
2483    hdrs : modules/mappers/mod_negotiation.c line=2451 column=18
h
drs = : pass=0
=
 r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out;
2484
2485    for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=2467 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=2467 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=2467 column=9
j
) {
2486        var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=2452 column=14
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=2467 column=9
j
];
2487
2488        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages && : true=0, false=0
&
variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languagesMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
2489            lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang = : pass=0
=
 apr_array_pstrcat : enter=0, leave=0

apr_array_pstrcat : /usr/include/apr-1/apr_tables.h line=211 column=21
a
pr_array_pstrcat(r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages, ',');
2490        }
2491        else {
2492            lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang = : pass=0
=
 NULL;
2493        }
2494
2495        /* Calculate Vary by looking for any difference between variants */
2496
2497        if : true=0, false=0
i
f (first_variant : modules/mappers/mod_negotiation.c line=2462 column=9
f
irst_variant) {
2498            sample_type : modules/mappers/mod_negotiation.c line=2453 column=17
s
ample_type     = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type;
2499            sample_charset : modules/mappers/mod_negotiation.c line=2456 column=17
s
ample_charset  = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset;
2500            sample_language : modules/mappers/mod_negotiation.c line=2454 column=17
s
ample_language = : pass=0
=
 lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang;
2501            sample_encoding : modules/mappers/mod_negotiation.c line=2455 column=17
s
ample_encoding = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding;
2502        }
2503        else {
2504            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
vary_by_type : modules/mappers/mod_negotiation.c line=2463 column=9
v
ary_by_type && : true=0, false=0
&
&
2505                MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(sample_type : modules/mappers/mod_negotiation.c line=2453 column=17
s
ample_type conditional operator : true=0, false=0
?
 sample_type : modules/mappers/mod_negotiation.c line=2453 column=17
s
ample_type : "",
2506                       variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type conditional operator : true=0, false=0
?
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type : "")) {
2507                vary_by_type : modules/mappers/mod_negotiation.c line=2463 column=9
v
ary_by_type = : pass=0
=
 1;
2508            }
2509            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
vary_by_charset : modules/mappers/mod_negotiation.c line=2465 column=9
v
ary_by_charset && : true=0, false=0
&
&
2510                MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(sample_charset : modules/mappers/mod_negotiation.c line=2456 column=17
s
ample_charset conditional operator : true=0, false=0
?
 sample_charset : modules/mappers/mod_negotiation.c line=2456 column=17
s
ample_charset : "",
2511                       variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset conditional operator : true=0, false=0
?
2512                       variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset : "")) {
2513                vary_by_charset : modules/mappers/mod_negotiation.c line=2465 column=9
v
ary_by_charset = : pass=0
=
 1;
2514            }
2515            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
vary_by_language : modules/mappers/mod_negotiation.c line=2464 column=9
v
ary_by_language && : true=0, false=0
&
&
2516                MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(sample_language : modules/mappers/mod_negotiation.c line=2454 column=17
s
ample_language conditional operator : true=0, false=0
?
 sample_language : modules/mappers/mod_negotiation.c line=2454 column=17
s
ample_language : "",
2517                       lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang conditional operator : true=0, false=0
?
 lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang : "")) {
2518                vary_by_language : modules/mappers/mod_negotiation.c line=2464 column=9
v
ary_by_language = : pass=0
=
 1;
2519            }
2520            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
vary_by_encoding : modules/mappers/mod_negotiation.c line=2466 column=9
v
ary_by_encoding && : true=0, false=0
&
&
2521                MC/DC independently affect : true=0, false=0
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
sTF
trcmp(sample_encoding : modules/mappers/mod_negotiation.c line=2455 column=17
s
ample_encoding conditional operator : true=0, false=0
?
 sample_encoding : modules/mappers/mod_negotiation.c line=2455 column=17
s
ample_encoding : "",
2522                       variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding conditional operator : true=0, false=0
?
2523                       variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding : "")) {
2524                vary_by_encoding : modules/mappers/mod_negotiation.c line=2466 column=9
v
ary_by_encoding = : pass=0
=
 1;
2525            }
2526        }
2527        first_variant : modules/mappers/mod_negotiation.c line=2462 column=9
f
irst_variant = : pass=0
=
 0;
2528
2529        if : true=0, false=0
i
f (! : true=0, false=0
!
neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates)
2530            continue : pass=0
c
ontinue;
2531
2532        /* Generate the string components for this Alternates entry */
2533
2534        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "{\"";
2535        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 ap_escape_path_segment : enter=0, leave=0

ap_escape_path_segment : include/httpd.h line=1491 column=20
a
p_escape_path_segment(r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name);
2536        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "\" ";
2537
2538        qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str = : pass=0
=
 (char *) apr_palloc : enter=0, leave=0

apr_palloc : /usr/include/apr-1/apr_pools.h line=419 column=21
a
pr_palloc(r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, 6);
2539        apr_snprintf : enter=0, leave=0

apr_snprintf : /usr/include/apr-1/apr_strings.h line=261 column=25
a
pr_snprintf(qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str, 6, "%1.3f", variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>source_quality : modules/mappers/mod_negotiation.c line=225 column=11
s
ource_quality);
2540
2541        /* Strip trailing zeros (saves those valuable network bytes) */
2542        if : true=0, false=0
i
f (qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[] : enter=0, leave=0
[
4] == : true=0, false=0
=
= '0') {
2543            qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[4] = : enter=0, leave=0
=
 '\0';
2544            if : true=0, false=0
i
f (qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[] : enter=0, leave=0
[
3] == : true=0, false=0
=
= '0') {
2545                qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[3] = : enter=0, leave=0
=
 '\0';
2546                if : true=0, false=0
i
f (qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[] : enter=0, leave=0
[
2] == : true=0, false=0
=
= '0') {
2547                    qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str[1] = : enter=0, leave=0
=
 '\0';
2548                }
2549            }
2550        }
2551        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 qstr : modules/mappers/mod_negotiation.c line=2458 column=11
q
str;
2552
2553        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type) {
2554            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 " {type ";
2555            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type;
2556            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2557        }
2558        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset) {
2559            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 " {charset ";
2560            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset;
2561            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2562        }
2563        if : true=0, false=0
i
f (lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang) {
2564            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 " {language ";
2565            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 lang : modules/mappers/mod_negotiation.c line=2457 column=11
l
ang;
2566            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2567        }
2568        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding) {
2569            /* Strictly speaking, this is non-standard, but so is TCN */
2570
2571            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 " {encoding ";
2572            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding;
2573            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2574        }
2575
2576        /* Note that the Alternates specification (in rfc2295) does
2577         * not require that we include {length x}, so we could omit it
2578         * if determining the length is too expensive.  We currently
2579         * always include it though.
2580         *
2581         * If the variant is a CGI script, find_content_length would
2582         * return the length of the script, not the output it
2583         * produces, so we check for the presence of a handler and if
2584         * there is one we don't add a length.
2585         *
2586         * XXX: TODO: This check does not detect a CGI script if we
2587         * get the variant from a type map.  This needs to be fixed
2588         * (without breaking things if the type map specifies a
2589         * content-length, which currently leads to the correct result).
2590         */
2591        if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req && : true=0, false=0
&
variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_reqMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>handler : include/httpd.h line=919 column=17
h
andler)
2592            && : true=0, false=0
&
& (len : modules/mappers/mod_negotiation.c line=2459 column=15
l
en = : pass=0
=
 find_content_length : enter=0, leave=0

find_content_length : modules/mappers/mod_negotiation.c line=1745 column=18
f
ind_content_length(neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg, variant : modules/mappers/mod_negotiation.c line=2486 column=18
v
ariant)) >= : true=0, false=0
MC/DC independently affect : true=0, false=0
>TF
= 0) {
2593
2594            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 " {length ";
2595            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 apr_off_t_toa : enter=0, leave=0

apr_off_t_toa : /usr/include/apr-1/apr_strings.h line=299 column=21
a
pr_off_t_toa(r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
2596                                                                   len : modules/mappers/mod_negotiation.c line=2459 column=15
l
en);
2597            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2598        }
2599
2600        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 "}";
2601        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr)) = : enter=0, leave=0
=
 ", "; /* trimmed below */
2602    }
2603
2604    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates && : true=0, false=0
&
neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_varsMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
2605        arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts-- : pass=0
-
-;                                 /* remove last comma */
2606        apr_table_mergen : enter=0, leave=0

apr_table_mergen : /usr/include/apr-1/apr_tables.h line=311 column=19
a
pr_table_mergen(hdrs : modules/mappers/mod_negotiation.c line=2451 column=18
h
drs, "Alternates",
2607                        apr_array_pstrcat : enter=0, leave=0

apr_array_pstrcat : /usr/include/apr-1/apr_tables.h line=211 column=21
a
pr_array_pstrcat(r : modules/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, arr : modules/mappers/mod_negotiation.c line=2460 column=25
a
rr, '\0'));
2608    }
2609
2610    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent || : true=0, false=0
|
MC/DC independently affect : true=0, false=0

vary_by_type : modules/mappers/mod_negotiation.c line=2463 column=9
vTF
ary_by_type || : true=0, false=0
|
MC/DC independently affect : true=0, false=0

vary_by_language : modules/mappers/mod_negotiation.c line=2464 column=9
vTF
ary_by_language || : true=0, false=0
|
|
2611        MC/DC independently affect : true=0, false=0

vary_by_language : modules/mappers/mod_negotiation.c line=2464 column=9
vTF
ary_by_language || : true=0, false=0
|
MC/DC independently affect : true=0, false=0

vary_by_charset : modules/mappers/mod_negotiation.c line=2465 column=9
vTF
ary_by_charset || : true=0, false=0
|
MC/DC independently affect : true=0, false=0

vary_by_encoding : modules/mappers/mod_negotiation.c line=2466 column=9
vTF
ary_by_encoding) {
2612
2613        apr_table_mergen : enter=0, leave=0

apr_table_mergen : /usr/include/apr-1/apr_tables.h line=311 column=19
a
pr_table_mergen(hdrs : modules/mappers/mod_negotiation.c line=2451 column=18
h
drs, "Vary", 2 + : 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/mappers/mod_negotiation.c line=2448 column=42
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
2614            neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent conditional operator : true=0, false=0
?
 ", negotiate"       : "",
2615            vary_by_type : modules/mappers/mod_negotiation.c line=2463 column=9
v
ary_by_type        conditional operator : true=0, false=0
?
 ", accept"          : "",
2616            vary_by_language : modules/mappers/mod_negotiation.c line=2464 column=9
v
ary_by_language    conditional operator : true=0, false=0
?
 ", accept-language" : "",
2617            vary_by_charset : modules/mappers/mod_negotiation.c line=2465 column=9
v
ary_by_charset     conditional operator : true=0, false=0
?
 ", accept-charset"  : "",
2618            vary_by_encoding : modules/mappers/mod_negotiation.c line=2466 column=9
v
ary_by_encoding    conditional operator : true=0, false=0
?
 ", accept-encoding" : "", NULL));
2619    }
2620
2621    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2448 column=64
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent) { /* Create TCN response header */
2622        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(hdrs : modules/mappers/mod_negotiation.c line=2451 column=18
h
drs, "TCN",
2623                      alg_result : modules/mappers/mod_negotiation.c line=2449 column=33
a
lg_result == : true=0, false=0
=
alg_list : modules/mappers/mod_negotiation.c line=2016 column=5
a
lg_list conditional operator : true=0, false=0
?
 "list" : "choice");
2624    }
2625}
2626
2627/**********************************************************************
2628 *
2629 * Return an HTML list of variants. This is output as part of the
2630 * choice response or 406 status body.
2631 */
2632
2633static char *make_variant_list : call=0
m
ake_variant_list(request_rec *r, negotiation_state *neg)
2634{
2635    apr_array_header_t *arr;
2636    int i;
2637    int max_vlist_array = (neg : modules/mappers/mod_negotiation.c line=2633 column=67
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts * : pass=0
*
 15) + : pass=0
+
 2;
2638
2639    /* In order to avoid O(n^2) memory copies in building the list,
2640     * we preallocate a apr_table_t with the maximum substrings possible,
2641     * fill it with the variant list, and then concatenate the entire array.
2642     */
2643    arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr = : pass=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/mappers/mod_negotiation.c line=2633 column=45
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, max_vlist_array : modules/mappers/mod_negotiation.c line=2637 column=9
m
ax_vlist_array, sizeof(char *));
2644
2645    *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "Available variants:\n<ul>\n";
2646
2647    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=2636 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=2636 column=9
i
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=2633 column=67
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=2636 column=9
i
) {
2648        var_rec *variant = &((var_rec *) neg : modules/mappers/mod_negotiation.c line=2633 column=67
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts)[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=2636 column=9
i
];
2649        const char *filename = variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name conditional operator : true=0, false=0
?
 variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name : "";
2650        apr_array_header_t *languages = variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages;
2651        const char *description = variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>description : modules/mappers/mod_negotiation.c line=210 column=17
d
escription
2652                                    conditional operator : true=0, false=0
?
 variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>description : modules/mappers/mod_negotiation.c line=210 column=17
d
escription
2653                                    : "";
2654
2655        /* The format isn't very neat, and it would be nice to make
2656         * the tags human readable (eg replace 'language en' with 'English').
2657         * Note that if you change the number of substrings pushed, you also
2658         * need to change the calculation of max_vlist_array above.
2659         */
2660        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "<li><a href=\"";
2661        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ap_escape_path_segment : enter=0, leave=0

ap_escape_path_segment : include/httpd.h line=1491 column=20
a
p_escape_path_segment(r : modules/mappers/mod_negotiation.c line=2633 column=45
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, filename : modules/mappers/mod_negotiation.c line=2649 column=21
f
ilename);
2662        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "\">";
2663        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ap_escape_html : enter=0, leave=0

ap_escape_html : include/httpd.h line=1512 column=20
a
p_escape_html(r : modules/mappers/mod_negotiation.c line=2633 column=45
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, filename : modules/mappers/mod_negotiation.c line=2649 column=21
f
ilename);
2664        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "</a> ";
2665        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 description : modules/mappers/mod_negotiation.c line=2651 column=21
d
escription;
2666
2667        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type) {
2668            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ", type ";
2669            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type;
2670        }
2671        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0

languages : modules/mappers/mod_negotiation.c line=2650 column=29
lTF
anguages && : true=0, false=0
&
languages : modules/mappers/mod_negotiation.c line=2650 column=29
l
anguagesMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
2672            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ", language ";
2673            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 apr_array_pstrcat : enter=0, leave=0

apr_array_pstrcat : /usr/include/apr-1/apr_tables.h line=211 column=21
a
pr_array_pstrcat(r : modules/mappers/mod_negotiation.c line=2633 column=45
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
2674                                                       languages : modules/mappers/mod_negotiation.c line=2650 column=29
l
anguages, ',');
2675        }
2676        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset) {
2677            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ", charset ";
2678            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset;
2679        }
2680        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding) {
2681            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 ", encoding ";
2682            *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 variant : modules/mappers/mod_negotiation.c line=2648 column=18
v
ariant-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding;
2683        }
2684        *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "</li>\n";
2685    }
2686    *((const char **) 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(arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr)) = : enter=0, leave=0
=
 "</ul>\n";
2687
2688    return : pass=0
r
eturn apr_array_pstrcat : enter=0, leave=0

apr_array_pstrcat : /usr/include/apr-1/apr_tables.h line=211 column=21
a
pr_array_pstrcat(r : modules/mappers/mod_negotiation.c line=2633 column=45
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, arr : modules/mappers/mod_negotiation.c line=2635 column=25
a
rr, '\0');
2689}
2690
2691static void store_variant_list : call=0
s
tore_variant_list(request_rec *r, negotiation_state *neg)
2692{
2693    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2691 column=45
r
-> : enter=0, leave=0
-
>main : include/httpd.h line=793 column=18
m
ain == : true=0, false=0
=
= NULL) {
2694        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/mappers/mod_negotiation.c line=2691 column=45
r
-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes, "variant-list", make_variant_list : enter=0, leave=0

make_variant_list : modules/mappers/mod_negotiation.c line=2633 column=14
m
ake_variant_list(r : modules/mappers/mod_negotiation.c line=2691 column=45
r
neg : modules/mappers/mod_negotiation.c line=2691 column=67
n
eg));
2695    }
2696    else {
2697        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/mappers/mod_negotiation.c line=2691 column=45
r
-> : enter=0, leave=0
-
>main : include/httpd.h line=793 column=18
m
ain-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes, "variant-list",
2698                      make_variant_list : enter=0, leave=0

make_variant_list : modules/mappers/mod_negotiation.c line=2633 column=14
m
ake_variant_list(r : modules/mappers/mod_negotiation.c line=2691 column=45
r
-> : enter=0, leave=0
-
>main : include/httpd.h line=793 column=18
m
ain, neg : modules/mappers/mod_negotiation.c line=2691 column=67
n
eg));
2699    }
2700}
2701
2702/* Called if we got a "Choice" response from the variant selection algorithm.
2703 * It checks the result of the chosen variant to see if it
2704 * is itself negotiated (if so, return error HTTP_VARIANT_ALSO_VARIES).
2705 * Otherwise, add the appropriate headers to the current response.
2706 */
2707
2708static int setup_choice_response : call=0
s
etup_choice_response(request_rec *r, negotiation_state *neg,
2709                                 var_rec *variant)
2710{
2711    request_rec *sub_req;
2712    const char *sub_vary;
2713
2714    if : true=0, false=0
i
f (! : true=0, false=0
!
variant : modules/mappers/mod_negotiation.c line=2709 column=43
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req) {
2715        int status;
2716
2717        sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req = : pass=0
=
 ap_sub_req_lookup_file : enter=0, leave=0

ap_sub_req_lookup_file : include/http_request.h line=84 column=27
a
p_sub_req_lookup_file(variant : modules/mappers/mod_negotiation.c line=2709 column=43
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name, r : modules/mappers/mod_negotiation.c line=2708 column=47
r
r : modules/mappers/mod_negotiation.c line=2708 column=47
r
-> : enter=0, leave=0
-
>output_filters : include/httpd.h line=990 column=25
o
utput_filters);
2718        status : modules/mappers/mod_negotiation.c line=2715 column=13
s
tatus = : pass=0
=
 sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus;
2719
2720        if : true=0, false=0
i
f (status : modules/mappers/mod_negotiation.c line=2715 column=13
s
tatus != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= HTTP_OK && : true=0, false=0
&
&
2721            ! : true=0, false=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(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "TCN")) {
2722            ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req);
2723            return : pass=0
r
eturn status : modules/mappers/mod_negotiation.c line=2715 column=13
s
tatus;
2724        }
2725        variant : modules/mappers/mod_negotiation.c line=2709 column=43
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req = : enter=0, leave=0
=
 sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req;
2726    }
2727    else {
2728        sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req = : pass=0
=
 variant : modules/mappers/mod_negotiation.c line=2709 column=43
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req;
2729    }
2730
2731    /* The variant selection algorithm told us to return a "Choice"
2732     * response. This is the normal variant response, with
2733     * some extra headers. First, ensure that the chosen
2734     * variant did or will not itself engage in transparent negotiation.
2735     * If not, set the appropriate headers, and fall through to
2736     * the normal variant handling
2737     */
2738
2739    /* This catches the error that a transparent type map selects a
2740     * transparent multiviews resource as the best variant.
2741     *
2742     * XXX: We do not signal an error if a transparent type map
2743     * selects a _non_transparent multiviews resource as the best
2744     * variant, because we can generate a legal negotiation response
2745     * in this case.  In this case, the vlist_validator of the
2746     * nontransparent subrequest will be lost however.  This could
2747     * lead to cases in which a change in the set of variants or the
2748     * negotiation algorithm of the nontransparent resource is never
2749     * propagated up to a HTTP/1.1 cache which interprets Vary.  To be
2750     * completely on the safe side we should return HTTP_VARIANT_ALSO_VARIES
2751     * for this type of recursive negotiation too.
2752     */
2753    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2708 column=69
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent && : true=0, false=0
&
&
2754        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(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "TCN")) {
2755        return : pass=0
r
eturn HTTP_VARIANT_ALSO_VARIES;
2756    }
2757
2758    /* This catches the error that a transparent type map recursively
2759     * selects, as the best variant, another type map which itself
2760     * causes transparent negotiation to be done.
2761     *
2762     * XXX: Actually, we catch this error by catching all cases of
2763     * type map recursion.  There are some borderline recursive type
2764     * map arrangements which would not produce transparent
2765     * negotiation protocol errors or lack of cache propagation
2766     * problems, but such arrangements are very hard to detect at this
2767     * point in the control flow, so we do not bother to single them
2768     * out.
2769     *
2770     * Recursive type maps imply a recursive arrangement of negotiated
2771     * resources which is visible to outside clients, and this is not
2772     * supported by the transparent negotiation caching protocols, so
2773     * if we are to have generic support for recursive type maps, we
2774     * have to create some configuration setting which makes all type
2775     * maps non-transparent when recursion is enabled.  Also, if we
2776     * want recursive type map support which ensures propagation of
2777     * type map changes into HTTP/1.1 caches that handle Vary, we
2778     * would have to extend the current mechanism for generating
2779     * variant list validators.
2780     */
2781    if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_reqMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>handler : include/httpd.h line=919 column=17
h
andler && : true=0, false=0
&
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler, "type-map") == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0) {
2782        return : pass=0
r
eturn HTTP_VARIANT_ALSO_VARIES;
2783    }
2784
2785    /* This adds an appropriate Variant-Vary header if the subrequest
2786     * is a multiviews resource.
2787     *
2788     * XXX: TODO: Note that this does _not_ handle any Vary header
2789     * returned by a CGI if sub_req is a CGI script, because we don't
2790     * see that Vary header yet at this point in the control flow.
2791     * This won't cause any cache consistency problems _unless_ the
2792     * CGI script also returns a Cache-Control header marking the
2793     * response as cachable.  This needs to be fixed, also there are
2794     * problems if a CGI returns an Etag header which also need to be
2795     * fixed.
2796     */
2797    if : true=0, false=0
i
f ((sub_vary : modules/mappers/mod_negotiation.c line=2712 column=17
s
ub_vary = : 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(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "Vary")) != : true=0, false=0
!
= NULL) {
2798        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/mappers/mod_negotiation.c line=2708 column=47
r
-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "Variant-Vary", sub_vary : modules/mappers/mod_negotiation.c line=2712 column=17
s
ub_vary);
2799
2800        /* Move the subreq Vary header into the main request to
2801         * prevent having two Vary headers in the response, which
2802         * would be legal but strange.
2803         */
2804        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/mappers/mod_negotiation.c line=2708 column=47
r
-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "Vary", sub_vary : modules/mappers/mod_negotiation.c line=2712 column=17
s
ub_vary);
2805        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(sub_req : modules/mappers/mod_negotiation.c line=2711 column=18
s
ub_req-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "Vary");
2806    }
2807
2808    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/mappers/mod_negotiation.c line=2708 column=47
r
-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out, "Content-Location",
2809                  ap_escape_path_segment : enter=0, leave=0

ap_escape_path_segment : include/httpd.h line=1491 column=20
a
p_escape_path_segment(r : modules/mappers/mod_negotiation.c line=2708 column=47
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, variant : modules/mappers/mod_negotiation.c line=2709 column=43
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name));
2810
2811    set_neg_headers : enter=0, leave=0

set_neg_headers : modules/mappers/mod_negotiation.c line=2448 column=13
s
et_neg_headers(r : modules/mappers/mod_negotiation.c line=2708 column=47
r
neg : modules/mappers/mod_negotiation.c line=2708 column=69
n
eg, alg_choice : modules/mappers/mod_negotiation.c line=2015 column=5
a
lg_choice);         /* add Alternates and Vary */
2812
2813    /* Still to do by caller: add Expires */
2814
2815    return : pass=0
r
eturn 0;
2816}
2817
2818/****************************************************************
2819 *
2820 * Executive...
2821 */
2822
2823static int do_negotiation : call=0
d
o_negotiation(request_rec *r, negotiation_state *neg,
2824                          var_rec **bestp, int prefer_scripts)
2825{
2826    var_rec *avail_recs = (var_rec *) neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
2827    int alg_result;              /* result of variant selection algorithm */
2828    int res;
2829    int j;
2830
2831    /* Decide if resource is transparently negotiable */
2832
2833    /* GET or HEAD? (HEAD has same method number as GET) */
2834    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number == : true=0, false=0
=
= M_GET) {
2835
2836        /* maybe this should be configurable, see also the comment
2837         * about recursive type maps in setup_choice_response()
2838         */
2839        neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent = : enter=0, leave=0
=
 1;
2840
2841        /* We can't be transparent if we are a map file in the middle
2842         * of the request URI.
2843         */
2844        if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2823 column=40
r
MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>path_info : include/httpd.h line=953 column=11
p
ath_info && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info)
2845            neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent = : enter=0, leave=0
=
 0;
2846
2847        for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=2829 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=2829 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=2829 column=9
j
) {
2848            var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=2826 column=14
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=2829 column=9
j
];
2849
2850            /* We can't be transparent, because of internal
2851             * assumptions in best_match(), if there is a
2852             * non-neighboring variant.  We can have a non-neighboring
2853             * variant when processing a type map.
2854             */
2855            if : true=0, false=0
i
f (ap_strchr_c(variant : modules/mappers/mod_negotiation.c line=2848 column=22
v
ariant-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name, '/'))
2856                neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent = : enter=0, leave=0
=
 0;
2857
2858            /* We can't be transparent, because of the behavior
2859             * of variant typemap bodies.
2860             */
2861            if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=2848 column=22
v
ariant-> : enter=0, leave=0
-
>body : modules/mappers/mod_negotiation.c line=206 column=15
b
ody) {
2862                neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent = : enter=0, leave=0
=
 0;
2863            }
2864        }
2865    }
2866
2867    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent)  {
2868        parse_negotiate_header : enter=0, leave=0

parse_negotiate_header : modules/mappers/mod_negotiation.c line=610 column=13
p
arse_negotiate_header(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg);
2869    }
2870    else { /* configure negotiation on non-transparent resource */
2871        neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>may_choose : modules/mappers/mod_negotiation.c line=271 column=9
m
ay_choose = : enter=0, leave=0
=
 1;
2872    }
2873
2874    maybe_add_default_accepts : enter=0, leave=0

maybe_add_default_accepts : modules/mappers/mod_negotiation.c line=703 column=13
m
aybe_add_default_accepts(neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg, prefer_scripts : modules/mappers/mod_negotiation.c line=2824 column=48
p
refer_scripts);
2875
2876    alg_result : modules/mappers/mod_negotiation.c line=2827 column=9
a
lg_result = : pass=0
=
 best_match : enter=0, leave=0

best_match : modules/mappers/mod_negotiation.c line=2286 column=12
b
est_match(neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg, bestp : modules/mappers/mod_negotiation.c line=2824 column=37
b
estp);
2877
2878    /* alg_result is one of
2879     *   alg_choice: a best variant is chosen
2880     *   alg_list: no best variant is chosen
2881     */
2882
2883    if : true=0, false=0
i
f (alg_result : modules/mappers/mod_negotiation.c line=2827 column=9
a
lg_result == : true=0, false=0
=
alg_list : modules/mappers/mod_negotiation.c line=2016 column=5
a
lg_list) {
2884        /* send a list response or HTTP_NOT_ACCEPTABLE error response  */
2885
2886        neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>send_alternates : modules/mappers/mod_negotiation.c line=270 column=9
s
end_alternates = : enter=0, leave=0
=
 1; /* always include Alternates header */
2887        set_neg_headers : enter=0, leave=0

set_neg_headers : modules/mappers/mod_negotiation.c line=2448 column=13
s
et_neg_headers(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg, alg_result : modules/mappers/mod_negotiation.c line=2827 column=9
a
lg_result);
2888        store_variant_list : enter=0, leave=0

store_variant_list : modules/mappers/mod_negotiation.c line=2691 column=13
s
tore_variant_list(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg);
2889
2890        if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent && : true=0, false=0
&
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
egMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>ua_supports_trans : modules/mappers/mod_negotiation.c line=269 column=9
u
a_supports_trans) {
2891            /* XXX todo: expires? cachability? */
2892
2893            /* Some HTTP/1.0 clients are known to choke when they get
2894             * a 300 (multiple choices) response without a Location
2895             * header.  However the 300 code response we are are about
2896             * to generate will only reach 1.0 clients which support
2897             * transparent negotiation, and they should be OK. The
2898             * response should never reach older 1.0 clients, even if
2899             * we have CacheNegotiatedDocs enabled, because no 1.0
2900             * proxy cache (we know of) will cache and return 300
2901             * responses (they certainly won't if they conform to the
2902             * HTTP/1.0 specification).
2903             */
2904            return : pass=0
r
eturn HTTP_MULTIPLE_CHOICES;
2905        }
2906
2907        if : true=0, false=0
i
f (! : true=0, false=0
!
* dereference : enter=0, leave=0
*
bestp : modules/mappers/mod_negotiation.c line=2824 column=37
b
estp) {
2908            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/mappers/mod_negotiation.c line=2823 column=40
r
,
2909                          "no acceptable variant: %s", r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename);
2910            return : pass=0
r
eturn HTTP_NOT_ACCEPTABLE;
2911        }
2912    }
2913
2914    /* Variant selection chose a variant */
2915
2916    /* XXX todo: merge the two cases in the if statement below */
2917    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>is_transparent : modules/mappers/mod_negotiation.c line=266 column=9
i
s_transparent) {
2918
2919        if : true=0, false=0
i
f ((res : modules/mappers/mod_negotiation.c line=2828 column=9
r
es = : pass=0
=
 setup_choice_response : enter=0, leave=0

setup_choice_response : modules/mappers/mod_negotiation.c line=2708 column=12
s
etup_choice_response(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg, * dereference : enter=0, leave=0
*
bestp : modules/mappers/mod_negotiation.c line=2824 column=37
b
estp)) != : true=0, false=0
!
= 0) {
2920            return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=2828 column=9
r
es; /* return if error */
2921        }
2922    }
2923    else {
2924        set_neg_headers : enter=0, leave=0

set_neg_headers : modules/mappers/mod_negotiation.c line=2448 column=13
s
et_neg_headers(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg, alg_result : modules/mappers/mod_negotiation.c line=2827 column=9
a
lg_result);
2925    }
2926
2927    /* Make sure caching works - Vary should handle HTTP/1.1, but for
2928     * HTTP/1.0, we can't allow caching at all.
2929     */
2930
2931    /* XXX: Note that we only set r->no_cache to 1, which causes
2932     * Expires: <now> to be added, when responding to a HTTP/1.0
2933     * client.  If we return the response to a 1.1 client, we do not
2934     * add Expires <now>, because doing so would degrade 1.1 cache
2935     * performance by preventing re-use of the response without prior
2936     * revalidation.  On the other hand, if the 1.1 client is a proxy
2937     * which was itself contacted by a 1.0 client, or a proxy cache
2938     * which can be contacted later by 1.0 clients, then we currently
2939     * rely on this 1.1 proxy to add the Expires: <now> when it
2940     * forwards the response.
2941     *
2942     * XXX: TODO: Find out if the 1.1 spec requires proxies and
2943     * tunnels to add Expires: <now> when forwarding the response to
2944     * 1.0 clients.  I (kh) recall it is rather vague on this point.
2945     * Testing actual 1.1 proxy implementations would also be nice. If
2946     * Expires: <now> is not added by proxies then we need to always
2947     * include Expires: <now> ourselves to ensure correct caching, but
2948     * this would degrade HTTP/1.1 cache efficiency unless we also add
2949     * Cache-Control: max-age=N, which we currently don't.
2950     *
2951     * Roy: No, we are not going to screw over HTTP future just to
2952     *      ensure that people who can't be bothered to upgrade their
2953     *      clients will always receive perfect server-side negotiation.
2954     *      Hell, those clients are sending bogus accept headers anyway.
2955     *
2956     *      Manual setting of cache-control/expires always overrides this
2957     *      automated kluge, on purpose.
2958     */
2959
2960    if : true=0, false=0
i
f ((! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
do_cache_negotiated_docs : enter=0, leave=0

do_cache_negotiated_docs : modules/mappers/mod_negotiation.c line=150 column=12
d
o_cache_negotiated_docs(r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>server : include/httpd.h line=784 column=17
s
erver)
2961         && : true=0, false=0
&
& (r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>proto_num : include/httpd.h line=812 column=9
p
roto_num < : true=0, false=0
MC/DC independently affect : true=0, false=0
<TF
 HTTP_VERSION(1,1)))
2962         && : true=0, false=0
&
neg : modules/mappers/mod_negotiation.c line=2823 column=62
n
eg-> : enter=0, leave=0
-
>count_multiviews_variants : modules/mappers/mod_negotiation.c line=264 column=9
c
ount_multiviews_variants != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= 1) {
2963        r : modules/mappers/mod_negotiation.c line=2823 column=40
r
-> : enter=0, leave=0
-
>no_cache : include/httpd.h line=935 column=9
n
o_cache = : enter=0, leave=0
=
 1;
2964    }
2965
2966    return : pass=0
r
eturn OK;
2967}
2968
2969static int handle_map_file : call=0
h
andle_map_file(request_rec *r)
2970{
2971    negotiation_state *neg;
2972    apr_file_t *map;
2973    var_rec *best;
2974    int res;
2975    char *udir;
2976    const char *new_req;
2977
2978    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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler,MAP_FILE_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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>handler : include/httpd.h line=919 column=17
h
andler,"type-map"))
2979        return : pass=0
r
eturn DECLINED;
2980
2981    neg : modules/mappers/mod_negotiation.c line=2971 column=24
n
eg = : pass=0
=
 parse_accept_headers : enter=0, leave=0

parse_accept_headers : modules/mappers/mod_negotiation.c line=565 column=27
p
arse_accept_headers(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
);
2982    if : true=0, false=0
i
f ((res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es = : pass=0
=
 read_type_map : enter=0, leave=0

read_type_map : modules/mappers/mod_negotiation.c line=939 column=12
r
ead_type_map(&map : modules/mappers/mod_negotiation.c line=2972 column=17
m
ap, neg : modules/mappers/mod_negotiation.c line=2971 column=24
n
eg, r : modules/mappers/mod_negotiation.c line=2969 column=41
r
))) {
2983        return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es;
2984    }
2985
2986    res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es = : pass=0
=
 do_negotiation : enter=0, leave=0

do_negotiation : modules/mappers/mod_negotiation.c line=2823 column=12
d
o_negotiation(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
neg : modules/mappers/mod_negotiation.c line=2971 column=24
n
eg, &best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est, 0);
2987    if : true=0, false=0
i
f (res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es != : true=0, false=0
!
= 0) return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es;
2988
2989    if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>body : modules/mappers/mod_negotiation.c line=206 column=15
b
ody)
2990    {
2991        conn_rec *c = r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection;
2992        apr_bucket_brigade *bb;
2993        apr_bucket *e;
2994
2995        ap_allow_standard_methods : enter=0, leave=0

ap_allow_standard_methods : include/http_request.h line=233 column=18
a
p_allow_standard_methods(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
, REPLACE_ALLOW, M_GET, M_OPTIONS,
2996                                  M_POST, -1);
2997        /* XXX: ?
2998         * if (r->method_number == M_OPTIONS) {
2999         *    return ap_send_http_options(r);
3000         *}
3001         */
3002        if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= M_GET && : true=0, false=0
&
r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= M_POST) {
3003            return : pass=0
r
eturn HTTP_METHOD_NOT_ALLOWED;
3004        }
3005
3006        /* ### These may be implemented by adding some 'extra' info
3007         *     of the file offset onto the etag
3008         * ap_update_mtime(r, r->finfo.mtime);
3009         * ap_set_last_modified(r);
3010         * ap_set_etag(r);
3011         */
3012        ap_set_accept_ranges : enter=0, leave=0

ap_set_accept_ranges : include/http_protocol.h line=316 column=18
a
p_set_accept_ranges(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
);
3013        ap_set_content_length : enter=0, leave=0

ap_set_content_length : include/http_protocol.h line=111 column=18
a
p_set_content_length(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes);
3014
3015        /* set MIME type and charset as negotiated */
3016        if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2973 column=14
b
estMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type) {
3017            if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2973 column=14
b
estMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset) {
3018                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/mappers/mod_negotiation.c line=2969 column=41
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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
3019                                                   best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type,
3020                                                   "; charset=",
3021                                                   best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_charset : modules/mappers/mod_negotiation.c line=209 column=17
c
ontent_charset,
3022                                                   NULL));
3023            }
3024            else {
3025                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/mappers/mod_negotiation.c line=2969 column=41
r
apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>mime_type : modules/mappers/mod_negotiation.c line=204 column=17
m
ime_type));
3026            }
3027        }
3028
3029        /* set Content-language(s) as negotiated */
3030        if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2973 column=14
b
estMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages && : true=0, false=0
&
best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languagesMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts) {
3031            r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>content_languages : include/httpd.h line=924 column=25
c
ontent_languages = : enter=0, leave=0
=
 apr_array_copy : enter=0, leave=0

apr_array_copy : /usr/include/apr-1/apr_tables.h line=176 column=35
a
pr_array_copy(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
3032                                                  best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_languages : modules/mappers/mod_negotiation.c line=208 column=25
c
ontent_languages);
3033        }
3034
3035        /* set Content-Encoding as negotiated */
3036        if : true=0, false=0
i
f (best : modules/mappers/mod_negotiation.c line=2973 column=14
b
estMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding) {
3037            r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding = : 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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
3038                                              best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>content_encoding : modules/mappers/mod_negotiation.c line=207 column=17
c
ontent_encoding);
3039        }
3040
3041        if : true=0, false=0
i
f ((res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es = : pass=0
=
 ap_meets_conditions : enter=0, leave=0

ap_meets_conditions : include/http_protocol.h line=181 column=17
a
p_meets_conditions(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
)) != : true=0, false=0
!
= OK) {
3042            return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es;
3043        }
3044
3045        if : true=0, false=0
i
f ((res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es = : pass=0
=
 ap_discard_request_body : enter=0, leave=0

ap_discard_request_body : include/http_protocol.h line=462 column=17
a
p_discard_request_body(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
)) != : true=0, false=0
!
= OK) {
3046            return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=2974 column=9
r
es;
3047        }
3048        bb : modules/mappers/mod_negotiation.c line=2992 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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, c : modules/mappers/mod_negotiation.c line=2991 column=19
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
3049        e : modules/mappers/mod_negotiation.c line=2993 column=21
e
 = : 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(map : modules/mappers/mod_negotiation.c line=2972 column=17
m
ap, best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>body : modules/mappers/mod_negotiation.c line=206 column=15
b
ody,
3050                                   (apr_size_t)best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>bytes : modules/mappers/mod_negotiation.c line=229 column=15
b
ytes, r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
3051                                   c : modules/mappers/mod_negotiation.c line=2991 column=19
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
3052        APR_BRIGADE_INSERT_TAIL(bb : modules/mappers/mod_negotiation.c line=2992 column=29
b
b, e : modules/mappers/mod_negotiation.c line=2993 column=21
e
);
3053        e : modules/mappers/mod_negotiation.c line=2993 column=21
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/mappers/mod_negotiation.c line=2991 column=19
c
-> : enter=0, leave=0
-
>bucket_alloc : include/httpd.h line=1103 column=32
b
ucket_alloc);
3054        APR_BRIGADE_INSERT_TAIL(bb : modules/mappers/mod_negotiation.c line=2992 column=29
b
b, e : modules/mappers/mod_negotiation.c line=2993 column=21
e
);
3055
3056        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(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>output_filters : include/httpd.h line=990 column=25
o
utput_filters, bb : modules/mappers/mod_negotiation.c line=2992 column=29
b
b);
3057    }
3058
3059    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2969 column=41
r
MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>path_info : include/httpd.h line=953 column=11
p
ath_info && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info) {
3060        /* remove any path_info from the end of the uri before trying
3061         * to change the filename.  r->path_info from the original
3062         * request is passed along on the redirect.
3063         */
3064        r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri[ap_find_path_info : enter=0, leave=0

ap_find_path_info : include/util_script.h line=62 column=17
a
p_find_path_info(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri, r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info)] = : enter=0, leave=0
=
 '\0';
3065    }
3066    udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir = : pass=0
=
 ap_make_dirstr_parent : enter=0, leave=0

ap_make_dirstr_parent : include/httpd.h line=1586 column=20
a
p_make_dirstr_parent(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
3067    udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir = : pass=0
=
 ap_escape_uri(r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir);
3068    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs) {
3069        if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info) {
3070            new_req : modules/mappers/mod_negotiation.c line=2976 column=17
n
ew_req = : 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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir, best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name,
3071                                  r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info, "?", r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs, NULL);
3072        }
3073        else {
3074            new_req : modules/mappers/mod_negotiation.c line=2976 column=17
n
ew_req = : 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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir, best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name,
3075                                  "?", r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs, NULL);
3076        }
3077    }
3078    else {
3079        new_req : modules/mappers/mod_negotiation.c line=2976 column=17
n
ew_req = : 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/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, udir : modules/mappers/mod_negotiation.c line=2975 column=11
u
dir, best : modules/mappers/mod_negotiation.c line=2973 column=14
b
est-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name,
3080                              r : modules/mappers/mod_negotiation.c line=2969 column=41
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info, NULL);
3081    }
3082    ap_internal_redirect : enter=0, leave=0

ap_internal_redirect : include/http_request.h line=157 column=18
a
p_internal_redirect(new_req : modules/mappers/mod_negotiation.c line=2976 column=17
n
ew_req, r : modules/mappers/mod_negotiation.c line=2969 column=41
r
);
3083    return : pass=0
r
eturn OK;
3084}
3085
3086static int handle_multi : call=0
h
andle_multi(request_rec *r)
3087{
3088    negotiation_state *neg;
3089    var_rec *best, *avail_recs;
3090    request_rec *sub_req;
3091    int res;
3092    int j;
3093
3094    if : true=0, false=0
i
f (r : modules/mappers/mod_negotiation.c line=3086 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
MC/DC independently affect : true=0, false=0
!TF
APR_NOFILE : /usr/include/apr-1/apr_file_info.h line=63 column=5 APR_NOFILE
3095        || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(ap_allow_options : enter=0, leave=0

ap_allow_options : include/http_core.h line=152 column=17
a
p_allow_options(r : modules/mappers/mod_negotiation.c line=3086 column=38
r
& : pass=0
&
 OPT_MULTI)) {
3096        return : pass=0
r
eturn DECLINED;
3097    }
3098
3099    neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg = : pass=0
=
 parse_accept_headers : enter=0, leave=0

parse_accept_headers : modules/mappers/mod_negotiation.c line=565 column=27
p
arse_accept_headers(r : modules/mappers/mod_negotiation.c line=3086 column=38
r
);
3100
3101    if : true=0, false=0
i
f ((res : modules/mappers/mod_negotiation.c line=3091 column=9
r
es = : pass=0
=
 read_types_multi : enter=0, leave=0

read_types_multi : modules/mappers/mod_negotiation.c line=1091 column=12
r
ead_types_multi(neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg))) {
3102      return_from_multi:
3103        /* free all allocated memory from subrequests */
3104        avail_recs : modules/mappers/mod_negotiation.c line=3089 column=21
a
vail_recs = : pass=0
=
 (var_rec *) neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
3105        for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=3092 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=3092 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=3092 column=9
j
) {
3106            var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=3089 column=21
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=3092 column=9
j
];
3107            if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=3106 column=22
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req) {
3108                ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(variant : modules/mappers/mod_negotiation.c line=3106 column=22
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req);
3109            }
3110        }
3111        return : pass=0
r
eturn res : modules/mappers/mod_negotiation.c line=3091 column=9
r
es;
3112    }
3113    if : true=0, false=0
i
f (neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts == : true=0, false=0
=
= 0) {
3114        return : pass=0
r
eturn DECLINED;
3115    }
3116
3117    res : modules/mappers/mod_negotiation.c line=3091 column=9
r
es = : pass=0
=
 do_negotiation : enter=0, leave=0

do_negotiation : modules/mappers/mod_negotiation.c line=2823 column=12
d
o_negotiation(r : modules/mappers/mod_negotiation.c line=3086 column=38
r
neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg, &best : modules/mappers/mod_negotiation.c line=3089 column=14
b
est,
3118                         (r : modules/mappers/mod_negotiation.c line=3086 column=38
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= M_GET) || : true=0, false=0
|
r : modules/mappers/mod_negotiation.c line=3086 column=38
r
MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>args : include/httpd.h line=955 column=11
a
rgs || : true=0, false=0
|
|
3119                         (r : modules/mappers/mod_negotiation.c line=3086 column=38
r
MC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>path_info : include/httpd.h line=953 column=11
p
ath_info && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
* dereference : enter=0, leave=0
*TF
r : modules/mappers/mod_negotiation.c line=3086 column=38
r
-> : enter=0, leave=0
-
>path_info : include/httpd.h line=953 column=11
p
ath_info));
3120    if : true=0, false=0
i
f (res : modules/mappers/mod_negotiation.c line=3091 column=9
r
es != : true=0, false=0
!
= 0)
3121        goto : pass=0
g
oto return_from_multi;
3122
3123    if : true=0, false=0
i
f (! : true=0, false=0
!
(sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req = : pass=0
=
 best : modules/mappers/mod_negotiation.c line=3089 column=14
b
est-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req)) {
3124        /* We got this out of a map file, so we don't actually have
3125         * a sub_req structure yet.  Get one now.
3126         */
3127
3128        sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req = : pass=0
=
 ap_sub_req_lookup_file : enter=0, leave=0

ap_sub_req_lookup_file : include/http_request.h line=84 column=27
a
p_sub_req_lookup_file(best : modules/mappers/mod_negotiation.c line=3089 column=14
b
est-> : enter=0, leave=0
-
>file_name : modules/mappers/mod_negotiation.c line=205 column=17
f
ile_name, r : modules/mappers/mod_negotiation.c line=3086 column=38
r
r : modules/mappers/mod_negotiation.c line=3086 column=38
r
-> : enter=0, leave=0
-
>output_filters : include/httpd.h line=990 column=25
o
utput_filters);
3129        if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus != : true=0, false=0
!
= HTTP_OK) {
3130            res : modules/mappers/mod_negotiation.c line=3091 column=9
r
es = : pass=0
=
 sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req-> : enter=0, leave=0
-
>status : include/httpd.h line=822 column=9
s
tatus;
3131            ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req);
3132            goto : pass=0
g
oto return_from_multi;
3133        }
3134    }
3135    if : true=0, false=0
i
f (sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs == : true=0, false=0
=
= NULL) {
3136        sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs = : enter=0, leave=0
=
 r : modules/mappers/mod_negotiation.c line=3086 column=38
r
-> : enter=0, leave=0
-
>args : include/httpd.h line=955 column=11
a
rgs;
3137    }
3138
3139    /* now do a "fast redirect" ... promotes the sub_req into the main req */
3140    ap_internal_fast_redirect : enter=0, leave=0

ap_internal_fast_redirect : include/http_request.h line=175 column=18
a
p_internal_fast_redirect(sub_req : modules/mappers/mod_negotiation.c line=3090 column=18
s
ub_req, r : modules/mappers/mod_negotiation.c line=3086 column=38
r
);
3141
3142    /* give no advise for time on this subrequest.  Perhaps we
3143     * should tally the last mtime amoung all variants, and date
3144     * the most recent, but that could confuse the proxies.
3145     */
3146    r : modules/mappers/mod_negotiation.c line=3086 column=38
r
-> : enter=0, leave=0
-
>mtime : include/httpd.h line=864 column=16
m
time = : enter=0, leave=0
=
 0;
3147
3148    /* clean up all but our favorite variant, since that sub_req
3149     * is now merged into the main request!
3150     */
3151    avail_recs : modules/mappers/mod_negotiation.c line=3089 column=21
a
vail_recs = : pass=0
=
 (var_rec *) neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
3152    for : true=0, false=0
f
or (j : modules/mappers/mod_negotiation.c line=3092 column=9
j
 = : pass=0
=
 0; j : modules/mappers/mod_negotiation.c line=3092 column=9
j
 < : true=0, false=0
<
 neg : modules/mappers/mod_negotiation.c line=3088 column=24
n
eg-> : enter=0, leave=0
-
>avail_vars : modules/mappers/mod_negotiation.c line=262 column=25
a
vail_vars-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+j : modules/mappers/mod_negotiation.c line=3092 column=9
j
) {
3153        var_rec *variant = &avail_recs : modules/mappers/mod_negotiation.c line=3089 column=21
a
vail_recs[] : enter=0, leave=0
[
j : modules/mappers/mod_negotiation.c line=3092 column=9
j
];
3154        if : true=0, false=0
i
f (variant : modules/mappers/mod_negotiation.c line=3153 column=18
v
ariant != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
best : modules/mappers/mod_negotiation.c line=3089 column=14
b
est && : true=0, false=0
&
variant : modules/mappers/mod_negotiation.c line=3153 column=18
v
ariantMC/DC independently affect : true=0, false=0
-> : enter=0, leave=0
-TF
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req) {
3155            ap_destroy_sub_req : enter=0, leave=0

ap_destroy_sub_req : include/http_request.h line=144 column=18
a
p_destroy_sub_req(variant : modules/mappers/mod_negotiation.c line=3153 column=18
v
ariant-> : enter=0, leave=0
-
>sub_req : modules/mappers/mod_negotiation.c line=203 column=18
s
ub_req);
3156        }
3157    }
3158    return : pass=0
r
eturn OK;
3159}
3160
3161/**********************************************************************
3162 * There is a problem with content-encoding, as some clients send and
3163 * expect an x- token (e.g. x-gzip) while others expect the plain token
3164 * (i.e. gzip). To try and deal with this as best as possible we do
3165 * the following: if the client sent an Accept-Encoding header and it
3166 * contains a plain token corresponding to the content encoding of the
3167 * response, then set content encoding using the plain token. Else if
3168 * the A-E header contains the x- token use the x- token in the C-E
3169 * header. Else don't do anything.
3170 *
3171 * Note that if no A-E header was sent, or it does not contain a token
3172 * compatible with the final content encoding, then the token in the
3173 * C-E header will be whatever was specified in the AddEncoding
3174 * directive.
3175 */
3176static int fix_encoding : call=0
f
ix_encoding(request_rec *r)
3177{
3178    const char *enc = r : modules/mappers/mod_negotiation.c line=3176 column=38
r
-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding;
3179    char *x_enc = NULL;
3180    apr_array_header_t *accept_encodings;
3181    accept_rec *accept_recs;
3182    int i;
3183
3184    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
* dereference : enter=0, leave=0
*
enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc) {
3185        return : pass=0
r
eturn DECLINED;
3186    }
3187
3188    if : true=0, false=0
i
f (enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'x' && : true=0, false=0
&
enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '-') {
3189        enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc += : pass=0
+
= 2;
3190    }
3191
3192    if : true=0, false=0
i
f ((accept_encodings : modules/mappers/mod_negotiation.c line=3180 column=25
a
ccept_encodings = : pass=0
=
 do_header_line : enter=0, leave=0

do_header_line : modules/mappers/mod_negotiation.c line=516 column=28
d
o_header_line(r : modules/mappers/mod_negotiation.c line=3176 column=38
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool,
3193             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/mappers/mod_negotiation.c line=3176 column=38
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, "Accept-Encoding"))) == : true=0, false=0
=
= NULL) {
3194        return : pass=0
r
eturn DECLINED;
3195    }
3196
3197    accept_recs : modules/mappers/mod_negotiation.c line=3181 column=17
a
ccept_recs = : pass=0
=
 (accept_rec *) accept_encodings : modules/mappers/mod_negotiation.c line=3180 column=25
a
ccept_encodings-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
3198
3199    for : true=0, false=0
f
or (i : modules/mappers/mod_negotiation.c line=3182 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_negotiation.c line=3182 column=9
i
 < : true=0, false=0
<
 accept_encodings : modules/mappers/mod_negotiation.c line=3180 column=25
a
ccept_encodings-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/mappers/mod_negotiation.c line=3182 column=9
i
) {
3200        char *name = accept_recs : modules/mappers/mod_negotiation.c line=3181 column=17
a
ccept_recs[] : enter=0, leave=0
[
i : modules/mappers/mod_negotiation.c line=3182 column=9
i
].name : modules/mappers/mod_negotiation.c line=176 column=11
n
ame;
3201
3202        if : true=0, false=0
i
f (! : true=0, false=0
!
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame, enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc)) {
3203            r : modules/mappers/mod_negotiation.c line=3176 column=38
r
-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding = : enter=0, leave=0
=
 name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame;
3204            return : pass=0
r
eturn OK;
3205        }
3206
3207        if : true=0, false=0
i
f (name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 'x' && : true=0, false=0
&
name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame[] : enter=0, leave=0
[
1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '-' && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame+ : pass=0
+
2, enc : modules/mappers/mod_negotiation.c line=3178 column=17
e
nc)) {
3208            x_enc : modules/mappers/mod_negotiation.c line=3179 column=11
x
_enc = : pass=0
=
 name : modules/mappers/mod_negotiation.c line=3200 column=15
n
ame;
3209        }
3210    }
3211
3212    if : true=0, false=0
i
f (x_enc : modules/mappers/mod_negotiation.c line=3179 column=11
x
_enc) {
3213        r : modules/mappers/mod_negotiation.c line=3176 column=38
r
-> : enter=0, leave=0
-
>content_encoding : include/httpd.h line=922 column=17
c
ontent_encoding = : enter=0, leave=0
=
 x_enc : modules/mappers/mod_negotiation.c line=3179 column=11
x
_enc;
3214        return : pass=0
r
eturn OK;
3215    }
3216
3217    return : pass=0
r
eturn DECLINED;
3218}
3219
3220static void register_hooks : call=1
r
egister_hooks(apr_pool_t *p)
3221{
3222    ap_hook_fixups : enter=1, leave=1

ap_hook_fixups : modules/mappers/ line=171 column=1
a
p_hook_fixups(fix_encoding : modules/mappers/mod_negotiation.c line=3176 column=12
f
ix_encoding,NULL,NULL,APR_HOOK_MIDDLE);
3223    ap_hook_type_checker : enter=1, leave=1

ap_hook_type_checker : modules/mappers/ line=195 column=1
a
p_hook_type_checker(handle_multi : modules/mappers/mod_negotiation.c line=3086 column=12
h
andle_multi,NULL,NULL,APR_HOOK_FIRST);
3224    ap_hook_handler : enter=1, leave=1

ap_hook_handler : modules/mappers/ line=3 column=1
a
p_hook_handler(handle_map_file : modules/mappers/mod_negotiation.c line=2969 column=12
h
andle_map_file,NULL,NULL,APR_HOOK_MIDDLE);
3225}
3226
3227module AP_MODULE_DECLARE_DATA negotiation_module =
3228{
3229    STANDARD20_MODULE_STUFF,
3230    create_neg_dir_config : modules/mappers/mod_negotiation.c line=69 column=14
c
reate_neg_dir_config,      /* dir config creator */
3231    merge_neg_dir_configs : modules/mappers/mod_negotiation.c line=79 column=14
m
erge_neg_dir_configs,      /* dir merger --- default is to override */
3232    NULL,                       /* server config */
3233    NULL,                       /* merge server config */
3234    negotiation_cmds : modules/mappers/mod_negotiation.c line=156 column=26
n
egotiation_cmds,           /* command apr_table_t */
3235    register_hooks : modules/mappers/mod_negotiation.c line=3220 column=13
r
egister_hooks              /* register hooks */
3236};
3237[EOF]


Generated by expcov