#726 API for handling HTTP uploads incrementally

Reporter Zash
Owner Zash
Stars (0)
  • Milestone-0.12
  • Priority-Medium
  • Status-Started
  • 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

    • 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

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

    Bumping feature to 0.12

    • 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 } });

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


New comment

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