f4697b5ec1 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix UnboundLocalError in post_urlencoded_get_json ( #4460 )  
							
							... 
							
							
							
							This could cause exceptions if the id server returned 4xx responses. 
							
						 
						
							2019-01-24 13:38:29 +00:00  
				
					
						
							
							
								 
						
							
							
								ea6abf6724 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix IP URL previews on Python 3 ( #4215 )  
							
							
							
						 
						
							2018-12-22 01:56:13 +11:00  
				
					
						
							
							
								 
						
							
							
								a334e1cace 
								
							
								 
							
						 
						
							
							
								
								Update to use new timeout function everywhere.  
							
							... 
							
							
							
							The existing deferred timeout helper function (and the one into twisted)
suffer from a bug when a deferred's canceller throws an exception, #3842 .
The new helper function doesn't suffer from this problem. 
							
						 
						
							2018-09-19 10:39:40 +01:00  
				
					
						
							
							
								 
						
							
							
								bc9af88a2d 
								
							
								 
							
						 
						
							
							
								
								fix  
							
							
							
						 
						
							2018-09-15 00:26:00 +10:00  
				
					
						
							
							
								 
						
							
							
								7c27c4d51c 
								
									
								
							
								 
							
						 
						
							
							
								
								merge ( #3576 )  
							
							
							
						 
						
							2018-09-14 03:11:11 +10:00  
				
					
						
							
							
								 
						
							
							
								2d2828dcbc 
								
									
								
							
								 
							
						 
						
							
							
								
								Port http/ to Python 3 ( #3771 )  
							
							
							
						 
						
							2018-09-06 00:10:47 +10:00  
				
					
						
							
							
								 
						
							
							
								b37c472419 
								
									
								
							
								 
							
						 
						
							
							
								
								Rename async to async_helpers because `async` is a keyword on Python 3.7 ( #3678 )  
							
							
							
						 
						
							2018-08-10 23:50:21 +10:00  
				
					
						
							
							
								 
						
							
							
								01e93f48ed 
								
							
								 
							
						 
						
							
							
								
								Kill off MatrixCodeMessageException  
							
							... 
							
							
							
							This code brings the SimpleHttpClient into line with the
MatrixFederationHttpClient by having it raise HttpResponseExceptions when a
request fails (rather than trying to parse for matrix errors and maybe raising
MatrixCodeMessageException).
Then, whenever we were checking for MatrixCodeMessageException and turning them
into SynapseErrors, we now need to check for HttpResponseExceptions and call
to_synapse_error. 
							
						 
						
							2018-08-01 16:02:46 +01:00  
				
					
						
							
							
								 
						
							
							
								a97c845271 
								
									
								
							
								 
							
						 
						
							
							
								
								Move v1-only APIs into their own module & isolate deprecated ones ( #3460 )  
							
							
							
						 
						
							2018-07-19 20:03:33 +10:00  
				
					
						
							
							
								 
						
							
							
								49af402019 
								
							
								 
							
						 
						
							
							
								
								run isort  
							
							
							
						 
						
							2018-07-09 16:09:20 +10:00  
				
					
						
							
							
								 
						
							
							
								6350bf925e 
								
									
								
							
								 
							
						 
						
							
							
								
								Attempt to be more performant on PyPy ( #3462 )  
							
							
							
						 
						
							2018-06-28 14:49:57 +01:00  
				
					
						
							
							
								 
						
							
							
								77ac14b960 
								
									
								
							
								 
							
						 
						
							
							
								
								Pass around the reactor explicitly ( #3385 )  
							
							
							
						 
						
							2018-06-22 09:37:10 +01:00  
				
					
						
							
							
								 
						
							
							
								330432031b 
								
									
								
							
								 
							
						 
						
							
							
								
								redact_uri in two missed log paths  
							
							
							
						 
						
							2018-06-06 10:25:48 +01:00  
				
					
						
							
							
								 
						
							
							
								e6cbf47773 
								
									
								
							
								 
							
						 
						
							
							
								
								factor out uri redaction into a method on http  
							
							
							
						 
						
							2018-06-05 18:31:40 +01:00  
				
					
						
							
							
								 
						
							
							
								09503126df 
								
									
								
							
								 
							
						 
						
							
							
								
								Strip `access_token` from outgoing requests using existing regex  
							
							
							
						 
						
							2018-06-02 23:25:13 +01:00  
				
					
						
							
							
								 
						
							
							
								53cc2cde1f 
								
							
								 
							
						 
						
							
							
								
								cleanup  
							
							
							
						 
						
							2018-05-22 17:32:57 -05:00  
				
					
						
							
							
								 
						
							
							
								df9f72d9e5 
								
							
								 
							
						 
						
							
							
								
								replacing portions  
							
							
							
						 
						
							2018-05-21 19:47:37 -05:00  
				
					
						
							
							
								 
						
							
							
								4f2f5171b7 
								
							
								 
							
						 
						
							
							
								
								replace stringIO imports  
							
							
							
						 
						
							2018-04-28 13:46:23 +02:00  
				
					
						
							
							
								 
						
							
							
								9d2c1b8429 
								
							
								 
							
						 
						
							
							
								
								Backport deferred.addTimeout  
							
							... 
							
							
							
							Twisted 16.0 doesn't have addTimeout, so let's backport it. 
							
						 
						
							2018-04-27 12:52:30 +01:00  
				
					
						
							
							
								 
						
							
							
								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  
				
					
						
							
							
								 
						
							
							
								02ba118f81 
								
							
								 
							
						 
						
							
							
								
								Increase http conn pool size  
							
							
							
						 
						
							2018-01-29 14:30:15 +00:00  
				
					
						
							
							
								 
						
							
							
								2c8526cac7 
								
							
								 
							
						 
						
							
							
								
								Use a connection pool for the SimpleHttpClient  
							
							... 
							
							
							
							In particular I hope this will help the pusher, which makes many requests to
sygnal, and is currently negotiating SSL for each one. 
							
						 
						
							2018-01-20 00:55:44 +00:00  
				
					
						
							
							
								 
						
							
							
								8b56977b6f 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #2586  from matrix-org/rav/frontend_proxy_auth_header  
							
							... 
							
							
							
							Front-end proxy: pass through auth header 
							
						 
						
							2017-10-27 11:01:50 +01:00  
				
					
						
							
							
								 
						
							
							
								173567a7f2 
								
							
								 
							
						 
						
							
							
								
								Docstring for post_urlencoded_get_json  
							
							
							
						 
						
							2017-10-27 10:59:50 +01:00  
				
					
						
							
							
								 
						
							
							
								0d8e3ad48b 
								
							
								 
							
						 
						
							
							
								
								Fix logcontext leaks in httpclient  
							
							... 
							
							
							
							`preserve_context_over_fn` is borked 
							
						 
						
							2017-10-26 18:17:10 +01:00  
				
					
						
							
							
								 
						
							
							
								12ef02dc3d 
								
							
								 
							
						 
						
							
							
								
								SimpleHTTPClient: add support for headers  
							
							... 
							
							
							
							Sometimes we need to pass headers into these methods 
							
						 
						
							2017-10-26 17:59:50 +01:00  
				
					
						
							
							
								 
						
							
							
								d0debb2116 
								
							
								 
							
						 
						
							
							
								
								Remember how twisted works  
							
							
							
						 
						
							2017-05-05 11:00:21 +01:00  
				
					
						
							
							
								 
						
							
							
								c2ddd773bc 
								
							
								 
							
						 
						
							
							
								
								Include the clock  
							
							
							
						 
						
							2017-05-05 10:52:46 +01:00  
				
					
						
							
							
								 
						
							
							
								7dd3bf5e24 
								
							
								 
							
						 
						
							
							
								
								Rewrite SimpleHttpClient.request to include timeouts  
							
							... 
							
							
							
							Fixes  #2191  
						
							2017-05-05 10:49:19 +01:00  
				
					
						
							
							
								 
						
							
							
								482a2ad122 
								
							
								 
							
						 
						
							
							
								
								No need for the exception variable  
							
							
							
						 
						
							2017-05-03 11:02:59 +01:00  
				
					
						
							
							
								 
						
							
							
								c0380402bc 
								
							
								 
							
						 
						
							
							
								
								List caught expection types  
							
							
							
						 
						
							2017-05-03 10:56:22 +01:00  
				
					
						
							
							
								 
						
							
							
								5fd12dce01 
								
							
								 
							
						 
						
							
							
								
								Remove debugging  
							
							
							
						 
						
							2017-04-26 12:36:26 +01:00  
				
					
						
							
							
								 
						
							
							
								c366276056 
								
							
								 
							
						 
						
							
							
								
								Fix get_json  
							
							
							
						 
						
							2017-04-26 10:07:01 +01:00  
				
					
						
							
							
								 
						
							
							
								1a9255c12e 
								
							
								 
							
						 
						
							
							
								
								Use CodeMessageException subclass instead  
							
							... 
							
							
							
							Parse json errors from get_json client methods and throw special
errors. 
							
						 
						
							2017-04-25 19:30:55 +01:00  
				
					
						
							
							
								 
						
							
							
								a46982cee9 
								
							
								 
							
						 
						
							
							
								
								Need the HTTP status code  
							
							
							
						 
						
							2017-04-21 16:20:12 +01:00  
				
					
						
							
							
								 
						
							
							
								70caf49914 
								
							
								 
							
						 
						
							
							
								
								Do the same for get_json  
							
							
							
						 
						
							2017-04-21 16:09:03 +01:00  
				
					
						
							
							
								 
						
							
							
								a1595cec78 
								
							
								 
							
						 
						
							
							
								
								Don't error for 3xx responses  
							
							
							
						 
						
							2017-04-21 11:51:17 +01:00  
				
					
						
							
							
								 
						
							
							
								a90a0f5c8a 
								
							
								 
							
						 
						
							
							
								
								Propagate errors sensibly from proxied IS requests  
							
							... 
							
							
							
							When we're proxying Matrix endpoints, parse out Matrix error
responses and turn them into SynapseErrors so they can be
propagated sensibly upstream. 
							
						 
						
							2017-04-21 11:32:48 +01:00  
				
					
						
							
							
								 
						
							
							
								0648e76979 
								
							
								 
							
						 
						
							
							
								
								Remove spurious newline  
							
							... 
							
							
							
							Apparently I just removed the spaces instead...
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> 
							
						 
						
							2016-12-12 18:41:30 +01:00  
				
					
						
							
							
								 
						
							
							
								d3bd94805f 
								
							
								 
							
						 
						
							
							
								
								Fixup for  #1689  and  #1690  
							
							... 
							
							
							
							Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> 
							
						 
						
							2016-12-12 16:32:47 +01:00  
				
					
						
							
							
								 
						
							
							
								6e18805ac2 
								
							
								 
							
						 
						
							
							
								
								IPv6 support for client.py  
							
							... 
							
							
							
							This is an (untested) general sketch of how to use wrapClientTLS to implement TLS over IPv6, as well as faster connections over IPv4. 
							
						 
						
							2016-12-11 11:10:32 +01:00  
				
					
						
							
							
								 
						
							
							
								255c229f23 
								
							
								 
							
						 
						
							
							
								
								Work around TLS bug in twisted  
							
							... 
							
							
							
							Wrap up twisted's FileBodyProducer to work around
https://twistedmatrix.com/trac/ticket/8473 . Hopefully this fixes
https://matrix.org/jira/browse/SYN-700 . 
							
						 
						
							2016-06-15 10:39:08 +01:00  
				
					
						
							
							
								 
						
							
							
								eb79110beb 
								
							
								 
							
						 
						
							
							
								
								Clean up the blacklist/whitelist handling.  
							
							... 
							
							
							
							Always set the config key with an empty list, even if a list isn't specified.
This means that the codepaths are the same for both the empty list and
for a missing key. Since the behaviour is the same for both cases this
makes the code somewhat easier to reason about. 
							
						 
						
							2016-05-16 13:03:59 +01:00  
				
					
						
							
							
								 
						
							
							
								792def4928 
								
							
								 
							
						 
						
							
							
								
								add a url_preview_ip_range_whitelist config param so we can whitelist the matrix.org IP space  
							
							
							
						 
						
							2016-05-01 12:44:24 +01:00  
				
					
						
							
							
								 
						
							
							
								f505575f69 
								
							
								 
							
						 
						
							
							
								
								Make InsecureInterceptableContextFactory work with SpiderEndpoint  
							
							
							
						 
						
							2016-04-19 16:08:14 +01:00  
				
					
						
							
							
								 
						
							
							
								83b2f83da0 
								
							
								 
							
						 
						
							
							
								
								actually throw meaningful errors  
							
							
							
						 
						
							2016-04-08 21:36:59 +01:00  
				
					
						
							
							
								 
						
							
							
								dafef5a688 
								
							
								 
							
						 
						
							
							
								
								Add url_preview_enabled config option to turn on/off preview_url endpoint. defaults to off.  
							
							... 
							
							
							
							Add url_preview_ip_range_blacklist to let admins specify internal IP ranges that must not be spidered.
Add url_preview_url_blacklist to let admins specify URL patterns that must not be spidered.
Implement a custom SpiderEndpoint and associated support classes to implement url_preview_ip_range_blacklist
Add commentary and generally address PR feedback 
							
						 
						
							2016-04-08 18:37:15 +01:00  
				
					
						
							
							
								 
						
							
							
								8b98a7e8c3 
								
							
								 
							
						 
						
							
							
								
								pep8  
							
							
							
						 
						
							2016-04-03 12:56:29 +01:00  
				
					
						
							
							
								 
						
							
							
								7426c86eb8 
								
							
								 
							
						 
						
							
							
								
								add a persistent cache of URL lookups, and fix up the in-memory one to work  
							
							
							
						 
						
							2016-04-03 00:31:57 +01:00  
				
					
						
							
							
								 
						
							
							
								d1b154a10f 
								
							
								 
							
						 
						
							
							
								
								support gzip compression, and don't pass through error msgs  
							
							
							
						 
						
							2016-04-02 03:06:39 +01:00