3 Commits
Author SHA1 Message Date
dualfroz b901ad9992 Describe this repository 2026-10-22 21:05:55 +02:00
dualfroz 6b628f71d7 fix(downloader): allow remote downloads without a Content-Length
Pulling a file from a URL failed with "request is missing ContentLength"
whenever the response had no known length. That happens for chunked
responses, and also for any gzip encoded response, because Go's HTTP
client decompresses it transparently and reports the length as -1.
raw.githubusercontent.com and pastebin both answer that way.

Instead of rejecting these responses, Filesystem.Write now accepts a
negative size meaning "unknown". The data is written to a hidden
temporary file next to the target through the existing quota file, so
the disk limit is enforced on every write, and it is only renamed over
the target once the copy has finished. If the download does not fit or
fails for any other reason, the temporary file is removed and an
existing file at the target is left untouched.

Downloads with a known length behave as before. Progress is only
tracked when the total size is known.

Fixes #133
2026-09-24 18:45:26 +02:00
upstream 7ffd9d8166 Upstream pelican/wings state of the touched files before 04487e1e6b 2026-09-24 18:35:19 +02:00