summary refs log tree commit diff
path: root/rust/src/rendezvous (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix MSC4108 'rendez-vous' responses with some reverse proxy in the front of ↵Quentin Gliech2025-02-251-1/+5
| | | | | | | | | | | | | | | | | | | | Synapse (#18178) MSC4108 relies on ETag to determine if something has changed on the rendez-vous channel. Strong and correct ETag comparison works if the response body is bit-for-bit identical, which isn't the case if a proxy in the middle compresses the response on the fly. This adds a `no-transform` directive to the `Cache-Control` header, which tells proxies not to transform the response body. Additionally, some proxies (nginx) will switch to `Transfer-Encoding: chunked` if it doesn't know the Content-Length of the response, and 'weakening' the ETag if that's the case. I've added `Content-Length` headers to all responses, to hopefully solve that. This basically fixes QR-code login when nginx or cloudflare is involved, with gzip/zstd/deflate compression enabled.
* Bump pyo3 to v0.23.2 (#17966)V024602024-11-271-4/+9
| | | | | | | | | Keep up-to-date with pyo3 releases. This bump enables Python 3.13 support and resolves deprecations. Links for quick reference: https://github.com/PyO3/pyo3/releases https://github.com/davidhewitt/pythonize/releases https://github.com/vorner/pyo3-log
* MSC4108: Add a Content-Type header on the PUT response (#17253)Quentin Gliech2024-11-261-0/+7
| | | | | | | | | | | | | | This is a workaround for some proxy setup, where the ETag header gets stripped from the response headers unless there is a Content-Type header set. In particular, we saw this bug when putting Cloudflare in front of Synapse. I'm pretty sure this is a Cloudflare bug, as this behaviour isn't documented anywhere, and doesn't make sense whatsoever. --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Update PyO3 to 0.21 (#17162)Erik Johnston2024-05-081-13/+25
| | | | | | | | | | This version change requires a migration to a new API. See https://pyo3.rs/v0.21.2/migration#from-020-to-021 This will fix the annoying warnings added when using the recent rust nightly: > warning: non-local `impl` definition, they should be avoided as they go against expectation
* MSC4108 implementation (#17056)Quentin Gliech2024-04-252-0/+406
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io> Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>