* Do we let Nginx to handle response Transfer-Encoding?
@ 2009-12-27 19:58 Iñaki Baz Castillo
2009-12-28 3:17 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Iñaki Baz Castillo @ 2009-12-27 19:58 UTC (permalink / raw)
To: mongrel-unicorn
Hi, I've checked that in case my Rack application (under Unicorn) doesn't set
"Content-Lentgh" neither "Transfer-Encoding", then Nginx automatically adds
"Transfer-Encoding: chunked" to the response (and edits the body properly to
be in chunked format).
However Unicorn is sending a response with body but without "Content-Lentgh"
or "Transfer-Encoding", so IMHO it's incorrect according to RFC 2616.
So, should my Rack application handle this stuff? or is it better if I let
Nginx "fixing" it for me?
Thanks a lot.
--
Iñaki Baz Castillo <ibc@aliax.net>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Do we let Nginx to handle response Transfer-Encoding?
2009-12-27 19:58 Do we let Nginx to handle response Transfer-Encoding? Iñaki Baz Castillo
@ 2009-12-28 3:17 ` Eric Wong
2009-12-28 10:23 ` Iñaki Baz Castillo
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2009-12-28 3:17 UTC (permalink / raw)
To: unicorn list
Iñaki Baz Castillo <ibc@aliax.net> wrote:
> Hi, I've checked that in case my Rack application (under Unicorn) doesn't set
> "Content-Lentgh" neither "Transfer-Encoding", then Nginx automatically adds
> "Transfer-Encoding: chunked" to the response (and edits the body properly to
> be in chunked format).
>
> However Unicorn is sending a response with body but without "Content-Lentgh"
> or "Transfer-Encoding", so IMHO it's incorrect according to RFC 2616.
>
> So, should my Rack application handle this stuff? or is it better if I let
> Nginx "fixing" it for me?
Just load the Rack::ContentLength middleware, if you're building a Rack
app from scratch. Some frameworks already handle Content-Length for
you.
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Do we let Nginx to handle response Transfer-Encoding?
2009-12-28 3:17 ` Eric Wong
@ 2009-12-28 10:23 ` Iñaki Baz Castillo
0 siblings, 0 replies; 3+ messages in thread
From: Iñaki Baz Castillo @ 2009-12-28 10:23 UTC (permalink / raw)
To: mongrel-unicorn
El Lunes, 28 de Diciembre de 2009, Eric Wong escribió:
> Iñaki Baz Castillo <ibc@aliax.net> wrote:
> > Hi, I've checked that in case my Rack application (under Unicorn) doesn't
> > set "Content-Lentgh" neither "Transfer-Encoding", then Nginx
> > automatically adds "Transfer-Encoding: chunked" to the response (and
> > edits the body properly to be in chunked format).
> >
> > However Unicorn is sending a response with body but without
> > "Content-Lentgh" or "Transfer-Encoding", so IMHO it's incorrect according
> > to RFC 2616.
> >
> > So, should my Rack application handle this stuff? or is it better if I
> > let Nginx "fixing" it for me?
>
> Just load the Rack::ContentLength middleware, if you're building a Rack
> app from scratch. Some frameworks already handle Content-Length for
> you.
The fact is that to realizing about the above, I already added Content-Length
by myself in the Rck application :)
Thanks.
--
Iñaki Baz Castillo <ibc@aliax.net>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-28 10:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-27 19:58 Do we let Nginx to handle response Transfer-Encoding? Iñaki Baz Castillo
2009-12-28 3:17 ` Eric Wong
2009-12-28 10:23 ` Iñaki Baz Castillo
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).