# Proxy to backend responding with transfer-encoding chunked results in wrong content type

**URL:** <https://www.ruby-forum.com/t/proxy-to-backend-responding-with-transfer-encoding-chunked-results-in-wrong-content-type/198784>\
**Category:** NGINX\
**Created:** [November 7, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/proxy-to-backend-responding-with-transfer-encoding-chunked-results-in-wrong-content-type/198784 "2010-11-07T21:38:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [November 7, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/proxy-to-backend-responding-with-transfer-encoding-chunked-results-in-wrong-content-type/198784/1 "2010-11-07T21:38:07Z")

</div>

I’m currently proxying riak ([http://riak.basho.com](http://riak.basho.com)) using nginx with  
great success. Now, however,  
I also need to proxy to luwak (for large files support in riak). The  
luwak interface responds with  
transfer-encoding: chunked and for some reason, when nginx passes this  
on, the content-type  
automatically becomes application/octet-stream. I’m running nginx  
0.8.52. Tried with turning  
proxy\_buffering off and using chunked\_transfer\_encoding on; among other  
things but I always  
get the same result, i.e application/octet-stream. Not so when making a  
GET request directly to  
luwak OR making a HEAD request to either luwak or nginx.

Should it be possible to do what I want using nginx and am I then doing  
something wrong or is there  
something missing in nginx to make this work?

Thanks for your time!
