* Get per request config.
*/
request_conf = (mod_chxj_req_config *)chxj_get_module_config(r->request_config, &chxj_module);
- if (request_conf && request_conf->spec) {
+ if (request_conf && request_conf->spec && request_conf->user_agent && strcmp(request_conf->user_agent, user_agent) == 0) {
DBG(r,"REQ[%x] Use spec cache.", (unsigned int)(apr_size_t)r);
returnType = request_conf->spec;
DBG(r,"REQ[%x] end %s() (Exist requestConf)", TO_ADDR(r),__func__);
return returnType;
}
+ request_conf->user_agent = user_agent;
conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
if (! conf->devices) {
if (! request_conf) {
request_conf = apr_pcalloc(r->pool, sizeof(mod_chxj_req_config));
request_conf->spec = NULL;
+ request_conf->user_agent = NULL;
chxj_set_module_config(r->request_config, &chxj_module, request_conf);
}
/*
* check and get mobile type.
+ * and request_conf->user_agent , request_conf->spec is set.
*/
spec = chxj_specified_device(r, user_agent);