You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Geoff Froud <ge...@1viewsolutions.com> on 2011/05/19 16:33:36 UTC

[users@httpd] mod_proxy changes content type from text/xml to text/plain

I am fronting my tomcat with apache2 using mod_proxy.  This is causing 
the content type of soap responses to be changed from text/xml to 
text/plain.

If my client application talks to tomcat directly then everthing works 
ok, i.e. soap responses are returned as text/xml, but if the 
request/response pass through apache2 then the response content type 
changes.

I have trawled the web and various forums and although I see a few 
similar threads, no one appears to have found an answer.

I've tried both mod_proxy_http and mod_proxy_ajp with the same result.

     ProxyPass /oneview http://127.0.0.1:8080/oneview
     ProxyPassReverse /oneview http://127.0.0.1:8080/oneview


     ProxyPass /oneview ajp://127.0.0.1:8009/oneview
     ProxyPassReverse /oneview ajp://127.0.0.1:8009/oneview


I would appreciate any useful pointers.

Versions:
Test Configuration:
Apache 2.2.14 (Ubuntu)
Tomcat 6.0.26

Production Configuration:
Apache 2.2.3 (RHEL)
Tomcat 6.0.24


Thanks,
Geoff

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy changes content type from text/xml to text/plain

Posted by Geoff Froud <ge...@1viewsolutions.com>.
On 19/05/2011 16:12, Nick Kew wrote:
> On 19 May 2011, at 15:33, Geoff Froud wrote:
>
>> I am fronting my tomcat with apache2 using mod_proxy.  This is causing the content type of soap responses to be changed from text/xml to text/plain.
> Is it?
>
> I'd expect your backend is in fact returning no content-type at all.
> Check the Apache documentation for DefaultType.
>
Thanks. You've hit the nail on the head.

By setting DefaultType to None my soap connection now works.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy changes content type from text/xml to text/plain

Posted by Nick Kew <ni...@webthing.com>.
On 19 May 2011, at 15:33, Geoff Froud wrote:

> I am fronting my tomcat with apache2 using mod_proxy.  This is causing the content type of soap responses to be changed from text/xml to text/plain.

Is it?

I'd expect your backend is in fact returning no content-type at all.
Check the Apache documentation for DefaultType.

-- 
Nick Kew

Available for work, contract or permanent
http://www.webthing.com/~nick/cv.html


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org