The part that is invisible to me is what happens after the controller does its job and hands the stream off to response.stream(). I've traced it far enough to see that it creates a "wrapped" version of the stream, and the stream is still correct and valid up to that point.
After that, I lose the train of execution. I have no idea what happens after response.stream() returns the wrapped stream. It is at this point that rocket or apache2 is invoked to send the stream back to my browser. In the debugger, I can see that the stream is received by my Safari browser and that it received only 4 bytes, the message "None". Clearly this is the result of some Python operation that was expected to return a result but didn't. Does web2py invoke any default handlers or views when streaming back a file? Is it possible I've borked a file, or a file is missing? Do any views get in the way at all of streaming? I know: A. The basic capability of streaming works. It works fine in a previous edition of my site. B. Nothing in web2py had changed behaviors. I went all the way back to 2.8.2 and the response is the same. C. The problem is not the stream itself. Nor in the code that directly hands off the stream. So we're getting down to the itty bitty probabilities. My stream is invoked by clicking on a link which in turn invokes a URL(). Obviously that works, but did it preset the response in some way that caused the failure? My old site worked by creating a FORM() with one BUTTON() and used "GET" to invoke the same URL. It worked in the old code, but does not work in the new. At some point the URL that was created to perform the streaming had the ".load" extension assigned by default, since it came from a (statically loaded) component itself. I noticed that by looking at the browser for the actual network it downloaded. I tried ".html" and empty to see if it made a difference. It did not. On Wednesday, September 14, 2016 at 6:40:56 AM UTC-7, Massimo Di Pierro wrote: > > What you have seems correct but we do not get the whole picture from this > code. Sorry. > > >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.