comparison libervia/backend/plugins/plugin_xep_0363.py @ 4136:72b95cdc3432

plugin XEP-0363: fix headers setting
author Goffi <goffi@goffi.org>
date Wed, 01 Nov 2023 13:55:34 +0100
parents 4a8b29ab34c0
children 0d7bb4df2343
comparison
equal deleted inserted replaced
4135:646b328b3980 4136:72b95cdc3432
230 headers = {"User-Agent": [C.APP_NAME.encode("utf-8")]} 230 headers = {"User-Agent": [C.APP_NAME.encode("utf-8")]}
231 231
232 for name, value in slot.headers: 232 for name, value in slot.headers:
233 name = name.encode('utf-8') 233 name = name.encode('utf-8')
234 value = value.encode('utf-8') 234 value = value.encode('utf-8')
235 headers[name] = value 235 headers[name] = [value]
236 236
237 237
238 await self.host.trigger.async_point( 238 await self.host.trigger.async_point(
239 "XEP-0363_upload", client, extra, sat_file, file_producer, slot, 239 "XEP-0363_upload", client, extra, sat_file, file_producer, slot,
240 triggers_no_cancel=True) 240 triggers_no_cancel=True)