Author Topic: v.3.9.1, message with download progress = 100% on the beginning of download  (Read 1966 times)

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
source of download was mods' centre


filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Recently I found out that downloading this archive (and another one vbross too) even manually using curl I see same effect, so this is probably related with archive/format/name/how it is stored on the server and less probably is related with some bug in the curl.

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
This is due to the HTTP redirect involved in the downloads from Softcoders' website, how curl handles them and how MegaGlest interprets (lib)curls' output.

When curl encounters a HTTP redirect and follows it, it will report 100% download at the time it follows the redirect, then for the actual download it finishes the download and reports 100% again. What MG does there is that it displays the progress of the first "download" (the HTTP redirection), not the second one.

There are several ways to fix this:
  • Make MegaGlest notice that a HTTP redirection is taking place, effectively ignoring download progress for this "download", but reporting that of the next one (unless it is another redirection).
  • Make MegaGlest's curl not follow redirections, and change the URLs in the mod database to point to the direct download locations (which would break Softcoders' download statistics script for these resources).
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

 

anything