Skip to content

Streaming response #16

Closed
Closed

Description

@The-EDev

ipkn#169, ipkn#46, ipkn#37, ipkn#8

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.

Activity

  1. The-EDev commented on Oct 18, 2020

    @The-EDev
    MemberAuthor

    ipkn#294 is a possible solution, although the Transfer-encoding would probably still be required here.

  2. The-EDev commented on Oct 19, 2020

    @The-EDev
    MemberAuthor

    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.

  3. The-EDev commented on Oct 19, 2020

    @The-EDev
    MemberAuthor

    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?

  4. mrozigor commented on Oct 19, 2020

    @mrozigor
    Member

    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?

  5. The-EDev commented on Oct 20, 2020

    @The-EDev
    MemberAuthor

    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

  6. added this to the 0.2 milestone on Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureCode based project improvement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions