handler_ctx.host = url.hostinfo;
handler_ctx.method = "GET";
handler_ctx.path = url.path;
- handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, "User-Agent");
+ handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, CHXJ_HTTP_USER_AGENT);
+ if (!handler_ctx.user_agent) {
+ handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, HTTP_USER_AGENT);
+ }
handler_ctx.post_data = NULL;
handler_ctx.post_data_len = 0;
handler_ctx.host = url.hostinfo;
handler_ctx.method = "POST";
handler_ctx.path = url.path;
- handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, "User-Agent");
+ handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, CHXJ_HTTP_USER_AGENT);
+ if (! handler_ctx.user_agent) {
+ handler_ctx.user_agent = (char *)apr_table_get(r->headers_in, HTTP_USER_AGENT);
+ }
handler_ctx.post_data = post_data;
handler_ctx.post_data_len = post_data_len;
apr_pool_create(&pool, r->pool);
dconf = chxj_get_module_config(r->per_dir_config, &chxj_module);
- user_agent = (char*)apr_table_get(r->headers_in, "User-Agent");
+ user_agent = (char*)apr_table_get(r->headers_in, CHXJ_HTTP_USER_AGENT);
+ if (!user_agent) {
+ user_agent = (char*)apr_table_get(r->headers_in, HTTP_USER_AGENT);
+ }
spec = chxj_specified_device(r, user_agent);
entryp = chxj_apply_convrule(r, dconf->convrules);