in reply to Re^2: Perl output is not inducing file download as expected
in thread Perl output is not inducing file download as expected

Regarding the buffering, my understanding is that it is only to prevent having to slurp the entire file into memory (which I may be doing anyhow at this point, but it is not necessary to do so). For a large file, that buffering would come in handy so as not to need to consume so much RAM in the process. So I don't see any real connection between the buffering and the http headers. Now, this is merely my interpretation--someone here may be able to enlighten me as to the true purpose of the buffering.

Blessings,

~Polyglot~

  • Comment on Re^3: Perl output is not inducing file download as expected

Replies are listed 'Best First'.
Re^4: Perl output is not inducing file download as expected
by haukex (Archbishop) on Sep 24, 2023 at 21:19 UTC
    Regarding the buffering, my understanding is that it is only to prevent having to slurp the entire file into memory

    Yes, that's correct. And since the network protocol stack is unlikely to be able to stuff a large file into a single network packet anyway, it makes no sense to read the entire file into RAM at once.