Thanks Maxim for your quick answer, <div><br></div><div>Do yo know something about nginx talking to backends in http 1.1 ? <br><br><div class="gmail_quote">On Wed, Sep 23, 2009 at 12:46 PM, Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello!<br>
<div class="im"><br>
On Wed, Sep 23, 2009 at 12:16:13PM -0500, Camilo Aguilar wrote:<br>
<br>
&gt; it means that I should not apply this patch:<br>
&gt; <a href="http://www.ruby-forum.com/attachment/1891/patch.chunkedfrom" target="_blank">http://www.ruby-forum.com/attachment/1891/patch.chunkedfrom</a>:<br>
&gt; <a href="http://www.ruby-forum.com/topic/152435" target="_blank">http://www.ruby-forum.com/topic/152435</a><br>
&gt; ??<br>
<br>
</div>This patch was considered to be wrong as it potentially introduce<br>
much more problems than it solves.  E.g. strange things will happen<br>
if any content filtering within nginx will be used (gzip, ssi,<br>
addition or sub filters and so on).<br>
<br>
It may work in your particular case, but I don&#39;t recommend it.<br>
Fixing backend instead is much more correct and safe aproach.<br>
<font color="#888888"><br>
Maxim Dounin<br>
</font><div><div></div><div class="h5"><br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Camilo Aguilar<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Sep 23, 2009 at 12:01 PM, Maxim Dounin &lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hello!<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Sep 23, 2009 at 11:45:09AM -0500, Camilo Aguilar wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Hi everyone,<br>
&gt; &gt; &gt; I am trying to use nginx as a reverse proxy and I am getting garbage<br>
&gt; &gt; symbols<br>
&gt; &gt; &gt; in my json responses:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 6a<br>
&gt; &gt; &gt;<br>
&gt; &gt; {&quot;codedField&quot;:[{&quot;code&quot;:&quot;01&quot;,&quot;name&quot;:&quot;Dpto01&quot;},{&quot;code&quot;:&quot;02&quot;,&quot;name&quot;:&quot;Dpto02&quot;},{&quot;code&quot;:&quot;03&quot;,&quot;name&quot;:&quot;Dpto03&quot;}]}<br>

&gt; &gt; &gt; 0<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I have tried with and without gzip and happens the same.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; My backend responses are well formed json and then I think that it should<br>
&gt; &gt; be<br>
&gt; &gt; &gt; a nginx issue.<br>
&gt; &gt;<br>
&gt; &gt; Looks like your backend returns Transfer-Encoding: chunked to<br>
&gt; &gt; HTTP/1.0 requests (behaviour explicitly forbidden by RFC2616).<br>
&gt; &gt;<br>
&gt; &gt; Fixing backend should help.<br>
&gt; &gt;<br>
&gt; &gt; Maxim Dounin<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Can anybody help me please ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Regards,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Camilo Aguilar<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt;   There are two ways of constructing a software design: One way is to<br>
&gt; &gt; make<br>
&gt; &gt; &gt; it so simple that there are obviously no deficiencies, and the other way<br>
&gt; &gt; is<br>
&gt; &gt; &gt; to make it so complicated that there are no obvious deficiencies. The<br>
&gt; &gt; first<br>
&gt; &gt; &gt; method is far more difficult.  -C. A. R. Hoare<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   Any fool can write code that a computer can understand. Good<br>
&gt; &gt; programmers<br>
&gt; &gt; &gt; write code that humans can understand. - Martin Fowler<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;   There are two ways of constructing a software design: One way is to make<br>
&gt; it so simple that there are obviously no deficiencies, and the other way is<br>
&gt; to make it so complicated that there are no obvious deficiencies. The first<br>
&gt; method is far more difficult.  -C. A. R. Hoare<br>
&gt;<br>
&gt;   Any fool can write code that a computer can understand. Good programmers<br>
&gt; write code that humans can understand. - Martin Fowler<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>   There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.  -C. A. R. Hoare<br>
<br>   Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler<br><br>
</div>