Skip to content
  • Antoine Fontaine's avatar
    aa9e5f3e
    Moved some error-prone copy-pasta-prone function into one: request_url · aa9e5f3e
    Antoine Fontaine authored
    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.
    aa9e5f3e
    Moved some error-prone copy-pasta-prone function into one: request_url
    Antoine Fontaine authored
    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.
Loading