matn@menem.com's picture

Greetings,

I built an application using Pion Net that does HTTP 1.1 streaming using sendChunk and sendFinalChunk API. That was nice and easy, and works great.

The problem I am facing is that my web server proxy (Nginx) doesn't proxy well the chunked streams. Of course, this is a problem of Nginx, but an easy workaround would be to change my app to stream using HTTP 1.0 (don't set the Content-Length header, and close socket when data is over).

I am having hard time figuring out how to use Pion Net to do that. In particular, not matter what I try, the response always comes out with Content-Length header set to something.

Any help on getting rid of Content-Length header is greatly appreciated!

Thanks,

-- Matt

Mike Dickey's picture
setDoNotSendContentLength

Hi Matt,

Did you try calling setDoNotSendContentLength() on the HTTPResponse object?

-Mike

Submitted by Mike Dickey on Wed, 03/11/2009 - 09:53.