sending a "zero chunk" when using chunked encoding

3 views
Skip to first unread message

ingenthr

unread,
Dec 21, 2009, 2:22:37 AM12/21/09
to MochiWeb
Hi,

I am looking to use mochiweb and json2 to implement a streaming-based
Comet app. I have a quick sample up and going, but looking around it
appears that the common thing to do with Comet when using chunked
transfer encoding is to send a "zero chunk" to indicate the end of a
given response[1].

However, mochiweb uses zero length to indicate the end of chunked
encoding.

I think I can go patch mochiweb_response.erl to send a zero chunk, but
I would have thought someone else may have run into this and has a
different kind of solution. Or maybe I'm just doing things wrong. :)

Any advice here?

Thanks in advance,

- Matt

1: http://orbited.org/blog/files/csp.html#3342-comet-responses

Reply all
Reply to author
Forward
0 new messages