💾 Archived View for rawtext.club › ~sloum › geminilist › 001508.gmi captured on 2020-10-31 at 02:19:51. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

<-- back to the mailing list

"Wide load" status code(s)?

solderpunk solderpunk at SDF.ORG

Wed Jun 10 20:57:46 BST 2020

- - - - - - - - - - - - - - - - - - - 

On Wed, Jun 10, 2020 at 01:16:12PM +0200, Petite Abeille wrote:

On Jun 10, 2020, at 09:32, solderpunk <solderpunk at SDF.ORG> wrote:
are forced to simply terminate the connection once a threshold amount of content has been downloaded
Is it really a problem? It should be user-agents prerogative to drop the connection anytime they see fit. And/or only handle a small subset of media type (e.g. text/* only). Ditto for showing network activities. Even the simplest of client could count how many bytes it has read so far, no?

Yes, of course, the client can always drop the connection whenever,whyever. But if your goal is to conserve limited or expensive networktraffic, being able to sever the connection immediately after seeing thefirst two bytes of the header will be much more effective thandownloading the first MiB of data and then saying "Nope, I can't affordto finish this" and then throwing away that already-downloaded MiB.

As for counting bytes, in fact AV-98, after parsing the header, simplyreads from the socket until EOF with a single line:

`body = f.read()`

Replacing this with a loop to make smaller reads, calculate theirlength, update a counter, and append them to a buffer is much more workthan simply printing a single "This may take a while..." statement afterparsing the header.

Cheers,Solderpunk