Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2010

Restart the download on HTTP 416 error (range not satisfiable)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: NoFixVersionApplicable
    • Fix Version/s: 4.4.2
    • Component/s: Remote client

      Description

      Issue

      Sentry Issue: NUXEO-DRIVE-29Y

      HTTPError: 416 Client Error: Requested Range Not Satisfiable for url: https://SERVER/nxfile/default/DOCUID/blobholder:0/FILE.txt
        File "lib\site-packages\nuxeo\client.py", line 271, in request
        File "lib\site-packages\requests\models.py", line 940, in raise_for_status
      
      HTTPError: HTTPError(416), error: b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>416 Requested Range Not Satisfiable</title>\n</head><body>\n<h1>Requested Range Not Satisfiable</h1>\n<p>None of the range-specifier values in the Range\nrequest-header field overlap the current extent\nof the selected resource.</p>\n<hr>\n<address>Apache/2.4.29 (Ubuntu) Server at sitios.rec.unicen.edu.ar Port 443</address>\n</body></html>\n', server trace: None
        File "nxdrive\engine\processor.py", line 276, in _execute
        File "nxdrive\engine\processor.py", line 1256, in _synchronize_remotely_created
        File "nxdrive\engine\processor.py", line 1323, in _create_remotely
        File "nxdrive\engine\processor.py", line 1076, in _download_content
        File "nxdrive\client\remote_client.py", line 759, in stream_content
        File "nxdrive\client\remote_client.py", line 275, in download
        File "lib\site-packages\nuxeo\client.py", line 274, in request
      

      Analysis

      This may happen when:

      • start downloading a document's blob
      • pause the download
      • alter the remote document's blob (with a smaller one)
      • resume the download

      Then, as the app saved the download progress, it will try to continue (resume) the download but the specified range (e.g.: the downloaded bytes) is higher than the new blob size.

      Action

      1. Add a test to effectively reproduce the error and confirm the analysis.
      2. Add a second test similar but with a new blob being bigger.
      3. When that error happens, discard the downloaded data to restart a new fresh transfer.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d