Moved some error-prone copy-pasta-prone function into one: request_url
It will allow smart cache detection «there is a file, so I can get it from cache» and smart cache date usage «can we use that file? — no, it's too old» mainly because it will avoid code duplication. It will also enable better disconnection detection, as we can now handle the «we got redirected to /enrol» in one place For now, we keep download_file_async separate, because it avoids keeping the whole file in RAM.
Please register or sign in to comment