• Resolved f2065

    (@f2065)


    Downloading large (350MB) files does not work in multi-threaded mode (for example, in Download Master ? westbyte). The file is downloaded to 99% and then does not go. Restart doesn’t help.
    The situation is checked and on a clean test site.
    Version Download Monitor – 4.4.14 (it was the same in older versions).

    The client log is something like this.
    The actual file is 328 MB (344,057,137 bytes).

    GET /download/112/ HTTP/1.1
    User-Agent: Download Master
    Accept: */*
    Accept-Encoding: identity
    Referer: https://test01.test/download/112/
    Range: bytes=344057136-
    Cache-Control: no-cache
    Host: test01.test
    
    HTTP/1.1 206 Partial Content
    Connection: Keep-Alive
    Keep-Alive: timeout=5, max=100
    expires: Wed, 11 Jan 1984 05:00:00 GMT
    cache-control: no-cache, must-revalidate, max-age=0
    set-cookie: wp_dlm_downloading=eyJkb3dubG9hZCI6MTEyLCJ2ZXJzaW9uIjoxfQ%3D%3D; expires=Thu, 13-Jan-2022 15:19:32 GMT; Max-Age=60; path=/; HttpOnly
    x-robots-tag: noindex, nofollow
    content-type: application/zip
    content-description: File Transfer
    content-disposition: attachment; filename="lineage-14.1-20211029-UNOFFICIAL-eagle.zip";
    content-transfer-encoding: binary
    accept-ranges: bytes
    content-range: bytes 344057136-344057136/344057137
    content-length: 0
    date: Thu, 13 Jan 2022 15:18:32 GMT
    server: LiteSpeed

    the long-described solution to the problem helps – fix DownloadHandler.php:

    line 554: ?$new_length = $range_end - $range;? -> ?$new_length = ($range_end - $range) + 1;? 
    line 564: ?if ( $this->readfile_chunked( $file_path, $range ) ) {? -> ?if ( $this->readfile_chunked( $file_path, false, $range ) ) {?

    first fix – allows you to complete the download
    second fix – fixes the problem of broken files, otherwise large files are damaged.

    why is this not in the official release?!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Downloading large files does not work in multi-threaded mode’ is closed to new replies.