wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

add ~size~ directive to print ~text~ size in message templates #182

Closed chubinou closed 9 years ago

wandenberg commented 9 years ago

Hi @chubinou, what is the motivation to expose the message size as part of the template?

chubinou commented 9 years ago

I am using this module to stream jpeg images over http, my template is

push_stream_message_template "--endofsection\nContent-Type: image/jpg\nContent-Length: ~size~\n\n~text~"; default_type "multipart/x-mixed-replace; boundary=endofsection";

without the content length, I had issues with some client

wandenberg commented 9 years ago

Applied with minor changes and tests on 1ad4b2a14fd82a105d8d9abd725c969a0027c9db