comparison mod_http_upload/mod_http_upload.lua @ 3369:fca95f1b8870

mod_http_upload: Fix order of arguments to :measure The docs are wrong tho.
author Kim Alvefur <zash@zash.se>
date Tue, 06 Nov 2018 14:44:11 +0100
parents 6d1c5ecf72c1
children 972832108c78
comparison
equal deleted inserted replaced
3368:76fc915647ab 3369:fca95f1b8870
111 111
112 local measure_slot = function () end 112 local measure_slot = function () end
113 if module.measure then 113 if module.measure then
114 -- COMPAT 0.9 114 -- COMPAT 0.9
115 -- module:measure was added in 0.10 115 -- module:measure was added in 0.10
116 measure_slot = module:measure("sizes", "slot"); 116 measure_slot = module:measure("slot", "sizes");
117 end 117 end
118 118
119 local function handle_request(origin, stanza, xmlns, filename, filesize) 119 local function handle_request(origin, stanza, xmlns, filename, filesize)
120 local username, host = origin.username, origin.host; 120 local username, host = origin.username, origin.host;
121 -- local clients only 121 -- local clients only
224 224
225 local measure_upload = function () end 225 local measure_upload = function () end
226 if module.measure then 226 if module.measure then
227 -- COMPAT 0.9 227 -- COMPAT 0.9
228 -- module:measure was added in 0.10 228 -- module:measure was added in 0.10
229 measure_upload = module:measure("sizes", "upload"); 229 measure_upload = module:measure("upload", "sizes");
230 end 230 end
231 231
232 -- http service 232 -- http service
233 local function upload_data(event, path) 233 local function upload_data(event, path)
234 local uploader = pending_slots[path]; 234 local uploader = pending_slots[path];