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.
Zash
on
Changes
tags Milestone-0.10
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.
Zash
on
Changes
tags Status-Accepted Milestone-0.11
MattJ
on
Bumping feature to 0.12
Changes
tagsMilestone-0.11 Milestone-0.12
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
}
});
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.
- 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.
Bumping feature to 0.12
ChangesMilestone-0.11Milestone-0.12Started 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 } });
Changeshttps://hg.prosody.im/trunk/rev/9673c95895fb