Adrian Tschira
d9fe2b2d9d
Replace some more comparisons with six
...
plus a bonus b"" string I missed last time
Signed-off-by: Adrian Tschira <nota@notafile.com>
2018-05-19 17:56:31 +02:00
Richard van der Hoff
9e2601f830
Merge pull request #3108 from NotAFile/py3-six-urlparse
...
Use six.moves.urlparse
2018-04-30 00:33:05 +01:00
Richard van der Hoff
9d2c1b8429
Backport deferred.addTimeout
...
Twisted 16.0 doesn't have addTimeout, so let's backport it.
2018-04-27 12:52:30 +01:00
Richard van der Hoff
1ea904b9f0
Use deferred.addTimeout instead of time_bound_deferred
...
This doesn't feel like a wheel we need to reinvent.
2018-04-23 00:53:18 +01:00
Adrian Tschira
2a3c33ff03
Use six.moves.urlparse
...
The imports were shuffled around a bunch in py3
Signed-off-by: Adrian Tschira <nota@notafile.com>
2018-04-15 21:22:43 +02:00
Krombel
1d71f484d4
use PUT instead of POST for federating groups/m.join_policy
2018-04-06 12:54:09 +02:00
Matthew Hodgson
ab9f844aaf
Add federation_domain_whitelist option ( #2820 )
...
Add federation_domain_whitelist
gives a way to restrict which domains your HS is allowed to federate with.
useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network
2018-01-22 19:11:18 +01:00
Richard van der Hoff
eaaabc6c4f
replace 'except:' with 'except Exception:'
...
what could possibly go wrong
2017-10-23 15:52:32 +01:00
David Baker
27955056e0
Merge branch 'develop' into erikj/groups_merged
2017-10-02 16:20:41 +01:00
Richard van der Hoff
e43de3ae4b
Improve logging of failures in matrixfederationclient
...
* don't log exception types twice
* not all exceptions have a meaningful 'message'. Use the repr rather than
attempting to build a string ourselves.
2017-09-28 15:38:09 +01:00
Erik Johnston
e884ff31d8
Add DELETE
2017-07-18 16:41:44 +01:00
Erik Johnston
05c13f6c22
Add 'args' param to post_json
2017-07-18 16:40:21 +01:00
Richard van der Hoff
4903ccf159
Fix some lies, and other clarifications, in docstrings
...
The documentation on get_json has been wrong ever since the very first commit
to synapse...
2017-04-21 01:31:09 +01:00
Richard van der Hoff
a380f041c2
try not to drop context after federation requests
...
preserve_context_over_fn uses a ContextPreservingDeferred, which only restores
context for the duration of its callbacks, which isn't really correct, and
means that subsequent operations in the same request can end up without their
logcontexts.
2017-03-23 22:36:21 +00:00
Richard van der Hoff
5a16cb4bf0
Ignore backoff history for invites, aliases, and roomdirs
...
Add a param to the federation client which lets us ignore historical backoff
data for federation queries, and set it for a handful of operations.
2017-03-23 12:23:22 +00:00
Richard van der Hoff
4bd597d9fc
push federation retry limiter down to matrixfederationclient
...
rather than having to instrument everywhere we make a federation call,
make the MatrixFederationHttpClient manage the retry limiter.
2017-03-23 09:28:46 +00:00
Richard van der Hoff
ad8a26e361
MatrixFederationHttpClient: clean up
...
rename _create_request to _request, and push ascii-encoding of `destination`
and `path` down into it
2017-03-23 00:27:04 +00:00
Richard van der Hoff
170ccc9de5
Fix routing loop when fetching remote media
...
When we proxy a media request to a remote server, add a query-param, which will
tell the remote server to 404 if it doesn't recognise the server_name.
This should fix a routing loop where the server keeps forwarding back to
itself.
Also improves the error handling on remote media fetches, so that we don't
always return a rather obscure 502.
2017-03-13 16:30:36 +00:00
Erik Johnston
b4bc6fef5b
Respect long_retries param and default to off
2016-12-29 00:58:34 +00:00
Erik Johnston
b7336ff32d
Clean up
2016-12-29 00:09:33 +00:00
Erik Johnston
5b6672c66d
Wrap connections in an N minute timeout to ensure they get reaped correctly
2016-12-29 00:06:53 +00:00
Richard van der Hoff
b5b3a7e867
More intelligent Content-Type parsing
...
Content-Type is allowed to contain options (`; charset=utf-8`, for
instance). We should allow that.
2016-11-30 15:07:32 +00:00
Mark Haines
949c2c5435
Add a timeout parameter for end2end key queries.
...
Add a timeout parameter for controlling how long synapse will wait
for responses from remote servers. For servers that fail include how
they failed to make it easier to debug.
Fetch keys from different servers in parallel rather than in series.
Set the default timeout to 10s.
2016-09-12 18:17:09 +01:00
Erik Johnston
ca8abfbf30
Clean up TransactionQueue
2016-08-10 16:24:16 +01:00
Daniel Wagner-Hall
d83d004ccd
Fix flake8 warnings for new flake8
2016-02-02 17:18:50 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Erik Johnston
0eabfa55f6
Fix typo
2015-11-20 17:17:58 +00:00
Erik Johnston
6408541075
Don't limit connections to perspective servers
2015-11-20 17:15:44 +00:00
Erik Johnston
2f2bbb4d06
Use min and not max to set an upper bound on retry interval
2015-11-20 09:34:58 +00:00
Erik Johnston
cbf3cd6151
Add comment
2015-11-17 18:29:29 +00:00
Erik Johnston
cf4ef5f3c7
Only retry federation requests for a long time for background requests
2015-11-17 18:26:50 +00:00
Erik Johnston
afdfd12bdf
Implement required method 'resumeProducing'
2015-11-17 16:57:06 +00:00
Erik Johnston
bceec65913
Slightly more aggressive retry timers at HTTP level
2015-11-17 15:10:05 +00:00
Erik Johnston
eacb068ac2
Retry dead servers a lot less often
2015-11-02 16:56:30 +00:00
Daniel Wagner-Hall
81a93ddcc8
Allow configuration to ignore invalid SSL certs
...
This will be useful for sytest, and sytest only, hence the aggressive
config key name.
2015-09-09 12:02:07 +01:00
Mark Haines
78323ccdb3
Remove syutil dependency in favour of smaller single-purpose libraries
2015-08-24 16:17:38 +01:00
Erik Johnston
adbd720fab
PEP8
2015-08-13 11:47:38 +01:00
Mark Haines
998a72d4d9
Merge branch 'develop' into markjh/twisted-15
...
Conflicts:
synapse/http/matrixfederationclient.py
2015-08-12 17:21:14 +01:00
Erik Johnston
653533a3da
Fix log context when sending requests
2015-06-19 11:46:49 +01:00
Erik Johnston
18968efa0a
Remove stale debug lines
2015-06-19 10:18:02 +01:00
Erik Johnston
9d112f4440
Add IDs to outbound transactions
2015-06-19 10:13:03 +01:00
Mark Haines
90abdaf3bc
Use Twisted-15.2.1, Use Agent.usingEndpointFactory rather than implement our own Agent
2015-06-01 10:51:50 +01:00
Erik Johnston
79e37a7ecb
Correctly pass connection pool parameter
2015-05-28 16:48:53 +01:00
Erik Johnston
11f51e6ded
Up maxPersistentPerHost count
2015-05-28 15:45:46 +01:00
Erik Johnston
291e942332
Use connection pool for federation connections
2015-05-28 15:43:21 +01:00
Erik Johnston
284f55a7fb
Add doc strings
2015-05-22 15:18:04 +01:00
Erik Johnston
5b1631a4a9
Add a timeout param to get_event
2015-05-19 14:53:32 +01:00
Erik Johnston
476899295f
Change the way we do logging contexts so that they survive divergences
2015-05-08 16:32:18 +01:00
Paul "LeoNerd" Evans
128cf2daf7
Appease pep8
2015-03-12 16:24:51 +00:00
Paul "LeoNerd" Evans
b0cf867319
Use _ instead of . as a metric namespacing separator, for Prometheus
2015-03-12 16:24:51 +00:00