Mercurial > prosody-modules
comparison mod_storage_s3/mod_storage_s3.lua @ 5950:f89367e421d1
mod_storage_s3: Inherit default HTTP client settings
Here too
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 07 Aug 2024 21:28:11 +0200 |
| parents | ff8b6d0b3bfa |
| children | f61564e11d3b |
comparison
equal
deleted
inserted
replaced
| 5949:97a9f939d472 | 5950:f89367e421d1 |
|---|---|
| 112 function driver:open(store, typ) | 112 function driver:open(store, typ) |
| 113 local mt = self[typ or "keyval"] | 113 local mt = self[typ or "keyval"] |
| 114 if not mt then | 114 if not mt then |
| 115 return nil, "unsupported-store"; | 115 return nil, "unsupported-store"; |
| 116 end | 116 end |
| 117 local httpclient = http.new({ connection_pooling = true }); | 117 local httpclient = http.default:new({ connection_pooling = true }); |
| 118 httpclient.events.add_handler("pre-request", aws_auth); | 118 httpclient.events.add_handler("pre-request", aws_auth); |
| 119 return setmetatable({ store = store; bucket = bucket; type = typ; http = httpclient }, mt); | 119 return setmetatable({ store = store; bucket = bucket; type = typ; http = httpclient }, mt); |
| 120 end | 120 end |
| 121 | 121 |
| 122 local keyval = { }; | 122 local keyval = { }; |
