apr_array_header_t *avail_vars; /* available variants */
int count_multiviews_variants; /* number of variants found on disk */
int is_transparent; /* 1 if this resource is trans. negotiable */
int dont_fiddle_headers; /* 1 if we may not fiddle with accept hdrs */
int ua_supports_trans; /* 1 if ua supports trans negotiation */
int send_alternates; /* 1 if we want to send an Alternates header */
int may_choose; /* 1 if we may choose a variant for the client */
int use_rvsa; /* 1 if we must use RVSA/1.0 negotiation algo */
} negotiation_state;
1
typedefstruct{ apr_pool_t *pool; request_rec *r; neg_dir_config *conf; char*dir_name; intaccept_q; /* 1 if an Accept item has a q= param */ floatdefault_lang_quality;/* fiddle lang q for variants with no lang */ /* the array pointers below are NULL if the corresponding accept * headers are not present */ apr_array_header_t *accepts; /* accept_recs */ apr_array_header_t *accept_encodings; /* accept_recs */ apr_array_header_t *accept_charsets; /* accept_recs */ apr_array_header_t *accept_langs; /* accept_recs */ apr_array_header_t *avail_vars; /* available variants */ intcount_multiviews_variants; /* number of variants found on disk */ intis_transparent; /* 1 if this resource is trans. negotiable */ intdont_fiddle_headers; /* 1 if we may not fiddle with accept hdrs */ intua_supports_trans; /* 1 if ua supports trans negotiation */ intsend_alternates; /* 1 if we want to send an Alternates header */ intmay_choose; /* 1 if we may choose a variant for the client */ intuse_rvsa; /* 1 if we must use RVSA/1.0 negotiation algo */}negotiation_state;
typedefstructaccept_rec{ char*name; /* MUST be lowercase */ floatquality; floatlevel; char*charset; /* for content-type only */}accept_rec;
关于文档类型的协商依赖的是: docs/conf/mime.types 如: 文档类型 资源扩展名 text/html html htm text/css css text/plain txt text conf def list log in
关于语言和字符集的协商依赖的是: docs/conf/charset.conv 如: # Lang-abbv Charset Language #——————————— en ISO-8859-1 English UTF-8 utf8 UTF-8 Unicode ucs Unicode th Cp874 Thai ja SJIS Japanese ko Cp949 Korean zh Cp950 Chinese-Traditional zh-cn GB2312 Chinese-Simplified zh-tw Cp950 Chinese 。。。