nginx as reverse proxy, returns garbage symbols
Camilo Aguilar
camilo.aguilar at gmail.com
Wed Sep 23 21:55:03 MSD 2009
Thanks Maxim for your quick answer,
Do yo know something about nginx talking to backends in http 1.1 ?
On Wed, Sep 23, 2009 at 12:46 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Wed, Sep 23, 2009 at 12:16:13PM -0500, Camilo Aguilar wrote:
>
> > it means that I should not apply this patch:
> > http://www.ruby-forum.com/attachment/1891/patch.chunkedfrom:
> > http://www.ruby-forum.com/topic/152435
> > ??
>
> This patch was considered to be wrong as it potentially introduce
> much more problems than it solves. E.g. strange things will happen
> if any content filtering within nginx will be used (gzip, ssi,
> addition or sub filters and so on).
>
> It may work in your particular case, but I don't recommend it.
> Fixing backend instead is much more correct and safe aproach.
>
> Maxim Dounin
>
> >
> > Regards,
> >
> > Camilo Aguilar
> >
> >
> >
> > On Wed, Sep 23, 2009 at 12:01 PM, Maxim Dounin <mdounin at mdounin.ru>
> wrote:
> >
> > > Hello!
> > >
> > > On Wed, Sep 23, 2009 at 11:45:09AM -0500, Camilo Aguilar wrote:
> > >
> > > > Hi everyone,
> > > > I am trying to use nginx as a reverse proxy and I am getting garbage
> > > symbols
> > > > in my json responses:
> > > >
> > > > 6a
> > > >
> > >
> {"codedField":[{"code":"01","name":"Dpto01"},{"code":"02","name":"Dpto02"},{"code":"03","name":"Dpto03"}]}
> > > > 0
> > > >
> > > >
> > > > I have tried with and without gzip and happens the same.
> > > >
> > > > My backend responses are well formed json and then I think that it
> should
> > > be
> > > > a nginx issue.
> > >
> > > Looks like your backend returns Transfer-Encoding: chunked to
> > > HTTP/1.0 requests (behaviour explicitly forbidden by RFC2616).
> > >
> > > Fixing backend should help.
> > >
> > > Maxim Dounin
> > >
> > >
> > > >
> > > > Can anybody help me please ?
> > > >
> > > > Regards,
> > > >
> > > > Camilo Aguilar
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> > > >
> > > > Any fool can write code that a computer can understand. Good
> > > programmers
> > > > write code that humans can understand. - Martin Fowler
> > >
> > >
> >
> >
> > --
> > 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
> >
> > Any fool can write code that a computer can understand. Good
> programmers
> > write code that humans can understand. - Martin Fowler
>
>
--
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
Any fool can write code that a computer can understand. Good programmers
write code that humans can understand. - Martin Fowler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090923/d9987980/attachment.html>
More information about the nginx
mailing list