Mercurial > prosody-modules
comparison mod_http_upload/mod_http_upload.lua @ 3377:683365d370d8
mod_http_upload: Also add CORS headers in response to PUT
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 18 Nov 2018 12:15:02 +0000 |
| parents | 972832108c78 |
| children | aefd64629e29 |
comparison
equal
deleted
inserted
replaced
| 3376:972832108c78 | 3377:683365d370d8 |
|---|---|
| 229 measure_upload = module:measure("upload", "sizes"); | 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 set_cross_domain_headers(event.response); | |
| 235 | |
| 234 local uploader = pending_slots[path]; | 236 local uploader = pending_slots[path]; |
| 235 if not uploader then | 237 if not uploader then |
| 236 module:log("warn", "Attempt to upload to unknown slot %q", path); | 238 module:log("warn", "Attempt to upload to unknown slot %q", path); |
| 237 return; -- 404 | 239 return; -- 404 |
| 238 end | 240 end |
