Software /
code /
prosody-modules
Comparison
mod_storage_s3/mod_storage_s3.lua @ 5783:59e38aaa3ec1
mod_storage_s3: Remove wrapper and original timestamp from payload (BC)
Unpacking the wrapper was already removed in 66986f5271c3 so it was
broken already.
Just rely on the Last-Modified date instead, it's not going to be
accurate if a different timestamp is passed, e.g. with migrations, but
that will have to be a future problem.
Perhaps the X-Amz-Meta-* can be used?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Dec 2023 12:23:15 +0100 |
parent | 5782:c7affea8bb24 |
child | 5785:ff8b6d0b3bfa |
comparison
equal
deleted
inserted
replaced
5782:c7affea8bb24 | 5783:59e38aaa3ec1 |
---|---|
220 end | 220 end |
221 | 221 |
222 | 222 |
223 -- PUT .../with/when/id | 223 -- PUT .../with/when/id |
224 function archive:append(username, key, value, when, with) | 224 function archive:append(username, key, value, when, with) |
225 local wrapper = st.stanza("wrapper"); | |
226 -- Minio had trouble with timestamps, probably the ':' characters, in paths. | |
227 wrapper:tag("delay", { xmlns = "urn:xmpp:delay"; stamp = dt.datetime(when) }):up(); | |
228 wrapper:add_direct_child(value); | |
229 key = key or new_uuid(); | 225 key = key or new_uuid(); |
230 return async.wait_for(new_request(self, "PUT", self:_path(username, nil, when, with, key), nil, wrapper):next(function(r) | 226 return async.wait_for(new_request(self, "PUT", self:_path(username, nil, when, with, key), nil, value):next(function(r) |
231 if r.code == 200 then | 227 if r.code == 200 then |
232 return key; | 228 return key; |
233 else | 229 else |
234 error(r.body); | 230 error(r.body); |
235 end | 231 end |