You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to be the logical continuation of static file serving, because as far as I understand, the connection times out regardless of what's going on, so a large static file is extremely likely not to be sent fully.
Testing (running Firefox with GPRS throttling and downloading a 4.4MB png) seems to show that timeouts arent an issue for set_static_file_info(), at least for the first 12 minutes.
although maybe the encoding header should be added.
It could be helpful however to stream responses larger than a certain size (say 1MB) automatically, the code for streaming is already there for static files, and can be extended to include all responses automatically, what do you think @mrozigor?
If we already have a solution for this - why not? And maybe add some switch during compile time/configuration file to switch between current version and proposed one?
Update: it seems chunked transfer is not exactly a part of the way we stream static files, but rather a different method altogether, according to MDN, chunked transfer ignores the content-size header, which could mean that the client will need to take data without knowing the size of that data, until a stop chunk is sent.
In all honesty i don't know whether to send content-size and stream the response or use Transfer-Encoding = Chunked and remove Content-Size
Activity
The-EDev commentedon Oct 18, 2020
ipkn#294 is a possible solution, although the Transfer-encoding would probably still be required here.
The-EDev commentedon Oct 19, 2020
Testing (running Firefox with GPRS throttling and downloading a 4.4MB png) seems to show that timeouts arent an issue for
set_static_file_info(), at least for the first 12 minutes.although maybe the encoding header should be added.
The-EDev commentedon Oct 19, 2020
It could be helpful however to stream responses larger than a certain size (say 1MB) automatically, the code for streaming is already there for static files, and can be extended to include all responses automatically, what do you think @mrozigor?
mrozigor commentedon Oct 19, 2020
If we already have a solution for this - why not? And maybe add some switch during compile time/configuration file to switch between current version and proposed one?
The-EDev commentedon Oct 20, 2020
Update: it seems chunked transfer is not exactly a part of the way we stream static files, but rather a different method altogether, according to MDN, chunked transfer ignores the content-size header, which could mean that the client will need to take data without knowing the size of that data, until a stop chunk is sent.
In all honesty i don't know whether to send content-size and stream the response or use
Transfer-Encoding = Chunkedand removeContent-Size