Skip to content
Snippets Groups Projects

Chunked/partial uploads

Merged Andrej Shadura requested to merge partial-uploads into main

Some proxies have a limitation where they can only cope with HTTP requests that are less than 4G in size (for file uploads). While this is enough for most uploads, it's not enough for everyone. In particular, texlive-extra builds result in a putjob payload about 5.7G in size.

Given the absence of a standard way to do this (there’s only an abandoned internet draft titled Partial Uploads in HTTP: https://datatracker.ietf.org/doc/html/draft-wright-http-partial-upload-01), use a custom Patch-Content-Range header to specify which chunk is being uploaded. Upon a complete upload, issue a HEAD request; the server calculates MD5 of the file sets ETag to the calculated value. After the upload is verified, the client issues a putjob request with no payload but chunked_upload=1 set; the proxy server uses that to distinguish it from non-chunked uploads

sequence diagram

Task: https://phabricator.apertis.org/T8655

Edited by Andrej Shadura

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Emanuele Aina
  • Emanuele Aina
  • Emanuele Aina
  • Andrej Shadura added 11 commits

    added 11 commits

    • acee5ca5 - WIP: Partial/chunked uploads
    • 414fe90b - Add a stub for chunked uploads
    • 69a3a650 - Add the chunked uploads blueprint to the server app
    • 2120fc94 - Add HEAD + ETag calculation
    • 5b0eb0e9 - Add typing stubs for xmltodict
    • 8b7033fa - Implement the upload client
    • db5b103e - Verify the hashsum after the upload
    • 2c2047e8 - Add a test for chunked upload over HTTP
    • 85cfaf05 - Integrate chunked uploads into the client
    • 1f66e45f - Split streaming and file upload routines out of upload_data
    • d74a5698 - Support chunked uploads on the server side

    Compare with previous version

  • Andrej Shadura added 13 commits

    added 13 commits

    • bdb7a2d3 - Server-side part of the partial/chunked uploads
    • 02b20c77 - Add a stub for chunked uploads
    • e049b2f8 - Add the chunked uploads blueprint to the server app
    • 89e43486 - Add HEAD + ETag calculation
    • 6a1a8617 - Add typing stubs for xmltodict
    • 51f2c945 - Implement the upload client
    • f9004a8a - Verify the hashsum after the upload
    • 0c0ea60b - Add a test for chunked upload over HTTP
    • 9c30dcba - Integrate chunked uploads into the client
    • 6da96ffc - Split streaming and file upload routines out of upload_data
    • 7aee09c3 - Support chunked uploads on the server side
    • c173248e - Add a full test for a 5 GB upload
    • 60a37ad8 - Move the simple upload test under tests/upload

    Compare with previous version

  • Andrej Shadura added 1 commit

    added 1 commit

    • 9af5835b - Remove loop= parameter from asyncio.gather() call

    Compare with previous version

  • Andrej Shadura changed the description

    changed the description

  • Emanuele Aina
  • Emanuele Aina changed the description

    changed the description

  • Andrej Shadura added 1 commit

    added 1 commit

    • 485cc20d - Remove loop= parameter from asyncio.gather() call

    Compare with previous version

  • Andrej Shadura changed title from WIP: Chunked/partial uploads to Chunked/partial uploads

    changed title from WIP: Chunked/partial uploads to Chunked/partial uploads

  • Andrej Shadura resolved all threads

    resolved all threads

  • Andrej Shadura added 1 commit

    added 1 commit

    • 22295cf7 - fixup! Add a test for chunked upload over HTTP

    Compare with previous version

  • Andrej Shadura marked this merge request as draft from 22295cf7

    marked this merge request as draft from 22295cf7

  • Andrej Shadura added 7 commits

    added 7 commits

    • cec9e00c - Add a test for chunked upload over HTTP
    • d56d7bd1 - Integrate chunked uploads into the client
    • a7396add - Split streaming and file upload routines out of upload_data
    • 1fc17f34 - Support chunked uploads on the server side
    • 2d52f21a - Add a full test for a 5 GB upload
    • add11c65 - Move the simple upload test under tests/upload
    • db30ffdc - Remove loop= parameter from asyncio.gather() call

    Compare with previous version

  • Ryan Gonzalez
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading