[Dancer-users] Feedback requested: streaming support

sawyer x xsawyerx at gmail.com
Fri Aug 19 16:05:57 CEST 2011


First, thanks to everyone for the quick feedback, I really appreciate it, :)
Hopefully I'll be able to answer everyone.

1. Although I was originally against adding a callbacks => {} hashref key
because I think it works against simplicity and the way Dancer feels for the
user (and wrote in this email that I don't want to do it), after thinking
about it some more, I've decided I'll change it as requested.
2. The reason this is in send_file() is because a. someone asked it for
send_file specifically, and b. this is where it will be mostly used. People
need to stream files. Refactoring this into another keyword (say,
"streamed_response", or "streamed_content") will allow people to use this
outside of send_file(), but it still remains very *relevant* inside
send_file().
Yes, you can open the files yourself and take care of all of it, but if
you'll need another layer of callback, and that's not very comfortable if
all you want to do is to send a file streaming.
3. Buffering 42K (or even allowing the user to set it) is a good idea. I'll
change that!
4. The around_cb will be changed to a more apt name.
5. I won't change any name to include "psgi" unless necessary, because a
user shouldn't know what PSGI is. It should be able to JFDI. In my opinion,
the documentation is where I should note it uses proper PSGI streaming.

Anything I missed? Anything else?

And dams, I'm happy you're doing well. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110819/5fbacb2c/attachment.htm>


More information about the Dancer-users mailing list