apache - Changing a REST service response content-type with mod_rewrite -


to work around ie8 compatibility issue, change content-type of rest service response without changing application source code.

i'm trying mod_rewrite rule:

rewritecond %{http_user_agent} .*msie\s8.* rewriterule /app/name(.*) - [t=application/new.content.type+xml] 

this rule works static content, not rest service responses.

i'm using apache 2.2.3 jboss 5.1.

on apache, i've configured rewriterule in httpd.conf file , in log file see:

(3) applying pattern '/app/name(.*)' uri '/app/name/events/service' (4) rewritecond: input='mozilla/4.0 (compatible; msie 8.0; windows nt 5.1; trident/4.0; .net clr     2.0.50727)' pattern='.*msie\\s8.*' => matched (2) remember /app/name/events/service have mime-type 'new.content.type' (1) pass through /app/name/events/service (1) force filename service have mime-type 'new.content.type' 

on jboss, i've tried configuring rewritevalve @ engine , server level, , in log file can see:

2014-11-19 10:56:34,442 debug [org.apache.catalina.core.containerbase.[jboss.web].[localhost]] rewrote /app/name/events/services /app/name/events/services rule pattern /app/name(.*) 

the rules appear applied, rest service content-type remains same.

could suggest reason why, or next steps debug further?

many thanks.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -