On 07/23/20 19:18, Vladimir Olovyannikov wrote:

>>> One suggestion: if the download fails for some reason, but the local
>>> file creation succeeded, then upon exit, the local file should be
>>> deleted. Otherwise an incomplete (possibly zero size) file is left in
>>> the filesystem.

> I was thinking about this.
> Sometimes, an error file returned by HTTP server (say, on 404 or 503) has
> more information than just 404, 503, etc.
> That was the only reason I do not delete it.
> I still return error code to the caller, so the caller can read it (maybe,
> to provide more information to the user), and/or delete it right away.
> What do you think?

Seems unusual to me; at least I'm not used to it with "wget". I seem to
remember that, whenever I get a 404 or 503 with wget, I don't have to
clean up after wget.

With a graphical web browser, things are different, in that case,
rendering the textual (HTML etc) response can be helpful.

If you decide to keep the local files in such cases (i.e., on failure),
I suggest documenting that fact in the built-in help text.

Thanks!
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63244): https://edk2.groups.io/g/devel/message/63244
Mute This Topic: https://groups.io/mt/75483573/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to