File size issues
Michael Lazar lazar.michael22 at gmail.com
Fri Aug 16 20:30:08 BST 2019
>>>> * Sean has pointed out in one of his RFCs that this means there is no
>>>> way for a client to know whether or not a download completed
>>>> successfully or was interrupted due to an accidentally dropped or
>>>> even a maliciously severred connection
Does TLS not have a native way to handle this? I did a quick search and found
that either the client/server may send a close_notify message before
terminating a TLS connection.
https://tools.ietf.org/html/rfc5246#section-7.2.1
> Very slick clients could just request a resource directly, keep track of
> how much response they've pulled down so far (or how many seconds
> they've been reading for) and once some threshold is passed (1MB? 5
> seconds?) make another request in a separate thread for the metadata and
> then begin displaying a progress bar or ETA prompt or something to
> reassure the user that things really are happening.
The whole idea is serving metadata in a separate TCP request might work fine
for static files, but it would break down when attempting to serve any type
of dynamically generated content.
Say I want to host an endpoint that does something like return a random quote
from fortune(1). Gopher sites love to serve these little CGI tools because
they're fun and require very little effort :) After I generate the text, I can
easily calculate the size and send along with the response in-line using
something like a response header. But I wouldn't be able to tell you ahead of
time from a separate metadata TCP request.
> Maybe we don't need to worry about this? There's no shame in not being
> able to match every single useful capability that HTTP has. It should
> have been clear from the outset we wouldn't be able to do that.
I agree with this sentiment. Knowing the file size would be nice to have, but I
haven't seen any use cases that are compelling enough to justify increasing the
complexity to the protocol for. Even in HTTP land, Content-Length is an optional
response header and there are several scenarios where it doesn't make sense to
include it at all.
- mozz
Archive home | About this archive