Hi Ram,
For the past few hours, I've been experimenting with the partial
download problem you've previously reported, and I cannot for the life
of me reproduce the early-terminating downloads (using throttling
software from another machine on the same network, and throttling it
at 5KB/s).
As a gut move, I'm going to try to convert the cowboy simple_bridge to
use a chunking response for larger responses, and see if that helps.
As for passing the buck to the cowboy static_handler, there is not a
way to do it directly from within a nitrogen-handled request, but
you've got two options here:
For both:
1) Add a "downloads/" to the static_paths in simple_bridge.config.
2) Save the generated file somewhere to the disk in "site/static/downloads"
Then you're two options are (assuming you saved your file as
"site/static/downloads/my_large_file.whatever")
A) wf:redirect("/downloads/my_large_file.whatever")
B) Return {file, "downloads/my_large_file.whatever"} from the main()
function in your module.
I'm going to spend the next half-hour or so experimenting with the
cowboy handler to see what I can come up. But it's quite odd to me
that the connection would die after 30 seconds.
-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
nitrogenweb...@googlegroups.com.
> To post to this group, send email to
nitro...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/nitrogenweb.
> For more options, visit
https://groups.google.com/d/optout.
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 ||
sigma-star.com || @jessegumm