#726 API for handling HTTP uploads incrementally

Reporter Zash
Owner Zash
Created
Updated
Stars (0)
Tags
  • Priority-Medium
  • Status-Fixed
  • Milestone-0.12
  • Type-Enhancement
  1. Zash on

    Requirements: - HTTP modules should be consulted before proceeding with larger uploads and allowed to accept or reject the request. This should happen as soon as the header has been parsed. - HTTP modules should be able to feed the data into a file handle or otherwise parse it incrementally.

  2. Zash on

    Changes
    • tags Milestone-0.10
  3. Zash on

    - HTTP modules should also be allowed to override the upload size limits for individual requests, especially if the data can be handled incrementally. Then the defaults can be adjusted to something closer to cover BOSH and simple forms.

  4. Zash on

    Changes
    • tags Milestone-0.11 Status-Accepted
  5. MattJ on

    Bumping feature to 0.12

    Changes
    • tags Milestone-0.11 Milestone-0.12
  6. Zash on

    Started after some thinking and discussing. Current WIP works something like this: module:provides("http", { streaming = true; route = { POST = function (event) if not event.request.body then event.request.body_sink = io.open("upload.dat", "w"); else if event.request.body_sink:close() then return 201; else return 500; end end end } });

    Changes
    • owner Zash
    • tags Status-Started
  7. Zash on

    https://hg.prosody.im/trunk/rev/9673c95895fb

  8. Zash on

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.