element-hq / element-hq/synapse
502, 504 (and maybe 503) `CONNECT` proxy response codes should be treated as though they are direct connection failures
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#16462](https://github.com/matrix-org/synapse/issues/16462).
---
offshoot from #15883:
If a 502 or 504 is returned as the status code of the `CONNECT` verb when proxying, Synapse should treat this as though it tried a connection itself and failed.
It should not log a CRITICAL log line but the same kind of handling as e.g. a connection timeout or refused connection should be used.
We might want to extend support for this to 503 as a kind of quirk given that in #15883 the reporter's proxy software returned 503 instead (this seems incorrect to me but I suppose it'd be worth checking more generally).
Contributor guide
Assessment
This issue has not been assessed yet.