Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update to use new timeout function everywhere. | Erik Johnston | 2018-09-19 | 1 | -2/+2 |
| | | | | | | | 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. | ||||
* | fix | Amber Brown | 2018-09-15 | 1 | -3/+3 |
| | |||||
* | merge (#3576) | Amber Brown | 2018-09-14 | 1 | -4/+10 |
| | |||||
* | Port http/ to Python 3 (#3771) | Amber Brown | 2018-09-06 | 1 | -51/+31 |
| | |||||
* | Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678) | Amber Brown | 2018-08-10 | 1 | -1/+1 |
| | |||||
* | Kill off MatrixCodeMessageException | Richard van der Hoff | 2018-08-01 | 1 | -34/+27 |
| | | | | | | | | | | | 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. | ||||
* | Move v1-only APIs into their own module & isolate deprecated ones (#3460) | Amber Brown | 2018-07-19 | 1 | -2/+4 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -23/+25 |
| | |||||
* | Attempt to be more performant on PyPy (#3462) | Amber Brown | 2018-06-28 | 1 | -1/+1 |
| | |||||
* | Pass around the reactor explicitly (#3385) | Amber Brown | 2018-06-22 | 1 | -3/+3 |
| | |||||
* | redact_uri in two missed log paths | Michael Telatynski | 2018-06-06 | 1 | -2/+2 |
| | |||||
* | factor out uri redaction into a method on http | Michael Telatynski | 2018-06-05 | 1 | -6/+2 |
| | |||||
* | Strip `access_token` from outgoing requests using existing regex | Michael Telatynski | 2018-06-02 | 1 | -1/+6 |
| | |||||
* | cleanup | Amber Brown | 2018-05-22 | 1 | -1/+2 |
| | |||||
* | replacing portions | Amber Brown | 2018-05-21 | 1 | -14/+6 |
| | |||||
* | replace stringIO imports | Adrian Tschira | 2018-04-28 | 1 | -2/+2 |
| | |||||
* | Backport deferred.addTimeout | Richard van der Hoff | 2018-04-27 | 1 | -2/+4 |
| | | | | Twisted 16.0 doesn't have addTimeout, so let's backport it. | ||||
* | Use deferred.addTimeout instead of time_bound_deferred | Richard van der Hoff | 2018-04-23 | 1 | -12/+8 |
| | | | | This doesn't feel like a wheel we need to reinvent. | ||||
* | Increase http conn pool size | Richard van der Hoff | 2018-01-29 | 1 | -1/+6 |
| | |||||
* | Use a connection pool for the SimpleHttpClient | Richard van der Hoff | 2018-01-20 | 1 | -1/+8 |
| | | | | | In particular I hope this will help the pusher, which makes many requests to sygnal, and is currently negotiating SSL for each one. | ||||
* | Merge pull request #2586 from matrix-org/rav/frontend_proxy_auth_header | Richard van der Hoff | 2017-10-27 | 1 | -28/+80 |
|\ | | | | | Front-end proxy: pass through auth header | ||||
| * | Docstring for post_urlencoded_get_json | Richard van der Hoff | 2017-10-27 | 1 | -0/+11 |
| | | |||||
| * | SimpleHTTPClient: add support for headers | Richard van der Hoff | 2017-10-26 | 1 | -28/+69 |
| | | | | | | | | Sometimes we need to pass headers into these methods | ||||
* | | Fix logcontext leaks in httpclient | Richard van der Hoff | 2017-10-26 | 1 | -10/+9 |
|/ | | | | `preserve_context_over_fn` is borked | ||||
* | Remember how twisted works | Kegan Dougal | 2017-05-05 | 1 | -2/+2 |
| | |||||
* | Include the clock | Kegan Dougal | 2017-05-05 | 1 | -0/+1 |
| | |||||
* | Rewrite SimpleHttpClient.request to include timeouts | Kegan Dougal | 2017-05-05 | 1 | -13/+19 |
| | | | | Fixes #2191 | ||||
* | No need for the exception variable | David Baker | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | List caught expection types | David Baker | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | Remove debugging | David Baker | 2017-04-26 | 1 | -2/+1 |
| | |||||
* | Fix get_json | David Baker | 2017-04-26 | 1 | -5/+4 |
| | |||||
* | Use CodeMessageException subclass instead | David Baker | 2017-04-25 | 1 | -44/+20 |
| | | | | | Parse json errors from get_json client methods and throw special errors. | ||||
* | Need the HTTP status code | David Baker | 2017-04-21 | 1 | -5/+5 |
| | |||||
* | Do the same for get_json | David Baker | 2017-04-21 | 1 | -8/+21 |
| | |||||
* | Don't error for 3xx responses | David Baker | 2017-04-21 | 1 | -1/+1 |
| | |||||
* | Propagate errors sensibly from proxied IS requests | David Baker | 2017-04-21 | 1 | -0/+30 |
| | | | | | | When we're proxying Matrix endpoints, parse out Matrix error responses and turn them into SynapseErrors so they can be propagated sensibly upstream. | ||||
* | Remove spurious newline | Johannes Löthberg | 2016-12-12 | 1 | -1/+0 |
| | | | | | | Apparently I just removed the spaces instead... Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> | ||||
* | Fixup for #1689 and #1690 | Johannes Löthberg | 2016-12-12 | 1 | -4/+7 |
| | | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> | ||||
* | IPv6 support for client.py | Glyph | 2016-12-11 | 1 | -16/+11 |
| | | | This is an (untested) general sketch of how to use wrapClientTLS to implement TLS over IPv6, as well as faster connections over IPv4. | ||||
* | Work around TLS bug in twisted | Richard van der Hoff | 2016-06-15 | 1 | -2/+26 |
| | | | | | | Wrap up twisted's FileBodyProducer to work around https://twistedmatrix.com/trac/ticket/8473. Hopefully this fixes https://matrix.org/jira/browse/SYN-700. | ||||
* | Clean up the blacklist/whitelist handling. | Mark Haines | 2016-05-16 | 1 | -2/+1 |
| | | | | | | | 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. | ||||
* | add a url_preview_ip_range_whitelist config param so we can whitelist the ↵ | Matthew Hodgson | 2016-05-01 | 1 | -2/+4 |
| | | | | matrix.org IP space | ||||
* | Make InsecureInterceptableContextFactory work with SpiderEndpoint | Erik Johnston | 2016-04-19 | 1 | -1/+4 |
| | |||||
* | actually throw meaningful errors | Matthew Hodgson | 2016-04-08 | 1 | -5/+16 |
| | |||||
* | Add url_preview_enabled config option to turn on/off preview_url endpoint. ↵ | Matthew Hodgson | 2016-04-08 | 1 | -5/+39 |
| | | | | | | | | | 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 | ||||
* | pep8 | Matthew Hodgson | 2016-04-03 | 1 | -4/+10 |
| | |||||
* | add a persistent cache of URL lookups, and fix up the in-memory one to work | Matthew Hodgson | 2016-04-03 | 1 | -3/+3 |
| | |||||
* | support gzip compression, and don't pass through error msgs | Matthew Hodgson | 2016-04-02 | 1 | -3/+8 |
| | |||||
* | handle spidered relative images correctly | Matthew Hodgson | 2016-03-31 | 1 | -1/+1 |
| | |||||
* | sync in changes from matrixfederationclient | Matthew Hodgson | 2016-03-31 | 1 | -2/+6 |
| | |||||
* | handle requests with missing content-length headers (e.g. YouTube) | Matthew Hodgson | 2016-03-31 | 1 | -7/+26 |
| | |||||
* | implement redirects | Matthew Hodgson | 2016-03-29 | 1 | -3/+3 |
| | |||||
* | make it work | Matthew Hodgson | 2016-03-29 | 1 | -1/+2 |
| | |||||
* | make it build | Matthew Hodgson | 2016-03-29 | 1 | -1/+1 |
| | |||||
* | Merge branch 'develop' into matthew/preview_urls | Matthew Hodgson | 2016-03-27 | 1 | -2/+15 |
|\ | |||||
| * | pep8 | David Baker | 2016-03-08 | 1 | -2/+5 |
| | | |||||
| * | Encode unicode objects given to post_urlencode* otherwise urllib.urlencode ↵ | David Baker | 2016-03-08 | 1 | -2/+12 |
| | | | | | | | | chokes. | ||||
* | | initial WIP of a tentative preview_url endpoint - incomplete, untested, ↵ | Matthew Hodgson | 2016-01-24 | 1 | -0/+81 |
|/ | | | | experimental, etc. just putting it here for safekeeping for now | ||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Verify third party ID server certificates | Daniel Wagner-Hall | 2015-10-16 | 1 | -4/+0 |
| | |||||
* | Fix previous merge to s/version_string/user_agent/ | Erik Johnston | 2015-10-10 | 1 | -2/+2 |
| | |||||
* | Add get_raw method to SimpleHttpClient, use this in CAS auth rather than ↵ | Steven Hammerton | 2015-10-10 | 1 | -19/+36 |
| | | | | requests | ||||
* | Use space not dash as delimiter | Daniel Wagner-Hall | 2015-10-06 | 1 | -1/+1 |
| | |||||
* | Use space not dash as delimiter | Daniel Wagner-Hall | 2015-10-06 | 1 | -1/+1 |
| | |||||
* | Preserve version string in user agent | Daniel Wagner-Hall | 2015-10-05 | 1 | -3/+3 |
| | |||||
* | Allow synapse's useragent to be customized | Daniel Wagner-Hall | 2015-10-02 | 1 | -6/+9 |
| | | | | | This will allow me to write tests which verify which server made HTTP requests in a federation context. | ||||
* | Rename context factory | Daniel Wagner-Hall | 2015-09-15 | 1 | -3/+3 |
| | | | | Mjark is officially no fun. | ||||
* | Fix random formatting | Daniel Wagner-Hall | 2015-09-09 | 1 | -1/+2 |
| | |||||
* | Allow configuration to ignore invalid SSL certs | Daniel Wagner-Hall | 2015-09-09 | 1 | -2/+23 |
| | | | | | This will be useful for sytest, and sytest only, hence the aggressive config key name. | ||||
* | Remove syutil dependency in favour of smaller single-purpose libraries | Mark Haines | 2015-08-24 | 1 | -1/+2 |
| | |||||
* | Fix log context when sending requests | Erik Johnston | 2015-06-19 | 1 | -5/+5 |
| | |||||
* | Log requests and responses sent via http.client | Erik Johnston | 2015-06-15 | 1 | -3/+15 |
| | |||||
* | Correctly pass connection pool parameter | Erik Johnston | 2015-05-28 | 1 | -1/+1 |
| | |||||
* | Up maxPersistentPerHost count | Erik Johnston | 2015-05-28 | 1 | -0/+1 |
| | |||||
* | Add connection pooling to SimpleHttpClient | Erik Johnston | 2015-05-28 | 1 | -2/+4 |
| | |||||
* | Change the way we do logging contexts so that they survive divergences | Erik Johnston | 2015-05-08 | 1 | -1/+5 |
| | |||||
* | New registration for C/S API v2. Only ReCAPTCHA working currently. | David Baker | 2015-03-30 | 1 | -0/+2 |
| | |||||
* | Appease pep8 | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -3/+7 |
| | |||||
* | Use _ instead of . as a metric namespacing separator, for Prometheus | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -2/+2 |
| | |||||
* | Rename Metrics' "keys" to "labels" | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -2/+2 |
| | |||||
* | Add vector counters to HTTP clients and servers; count the requests by ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+22 |
| | | | | method and responses by method and response code | ||||
* | Pull out all uses of the underlying HTTP user agent .request() method into a ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -5/+10 |
| | | | | single wrapper function, to make adding metrics easier | ||||
* | Fix bug which prevented the HS pushing events to the AS due to FrozenEvents | Kegan Dougal | 2015-03-02 | 1 | -1/+1 |
| | |||||
* | Use git aware version string in User-Agent and Server headers | Erik Johnston | 2015-02-18 | 1 | -5/+5 |
| | |||||
* | Merge pull request #50 from matrix-org/application-services | Mark Haines | 2015-02-13 | 1 | -10/+57 |
|\ | | | | | Application Services | ||||
| * | Minor tweaks based on PR feedback. | Kegan Dougal | 2015-02-11 | 1 | -1/+2 |
| | | |||||
| * | Add SimpleHttpClient.put_json with the same semantics as get_json. | Kegan Dougal | 2015-02-04 | 1 | -2/+46 |
| | | |||||
| * | Update user/alias query APIs to use new format of SimpleHttpClient.get_json | Kegan Dougal | 2015-02-04 | 1 | -0/+3 |
| | | |||||
| * | Modify API for SimpleHttpClient.get_json and update usages. | Kegan Dougal | 2015-02-04 | 1 | -10/+9 |
| | | | | | | | | | | | | | | | | | | | | Previously, this would only return the HTTP body as JSON, and discard other response information (e.g. the HTTP response code). This has now been changed to throw a CodeMessageException on a non-2xx response, with the response code and body, which can then be parsed as JSON. Affected modules include: - Registration/Login (when using an email for IS auth) | ||||
* | | Use encode_canonical_json for http client | Erik Johnston | 2015-02-11 | 1 | -1/+3 |
| | | |||||
* | | Blunty replace json with simplejson | Erik Johnston | 2015-02-11 | 1 | -1/+1 |
|/ | |||||
* | Merge branch 'develop' into pushers | David Baker | 2015-01-13 | 1 | -3/+9 |
|\ | |||||
| * | SYN-231: User agent header broken | Mark Haines | 2015-01-08 | 1 | -3/+3 |
| | | |||||
| * | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | | |||||
| * | Include version in User-Agent and Server headers | Mark Haines | 2014-12-22 | 1 | -2/+8 |
| | | |||||
* | | More work on pushers. Attempt to do HTTP pokes. Not sure if the actual HTTP ↵ | David Baker | 2014-11-21 | 1 | -0/+19 |
|/ | | | | pokes work or not yet but the retry semantics are pretty good. | ||||
* | Fix pep8 and pyflakes warnings | Mark Haines | 2014-11-20 | 1 | -3/+4 |
| | |||||
* | Separate out the matrix http client completely because just about all of its ↵ | David Baker | 2014-11-20 | 1 | -322/+29 |
| | | | | code it now separate from the simple case we need for standard HTTP(S) | ||||
* | Refactor the HTTP clients a little. | David Baker | 2014-11-20 | 1 | -79/+75 |
| | |||||
* | CaptchaServerHttpClient should extend the base, not matrix http client. | David Baker | 2014-11-20 | 1 | -1/+1 |
| | |||||
* | SYN-141: Encode query params as UTF-8. | Mark Haines | 2014-11-18 | 1 | -1/+7 |
| | |||||
* | Merge branch 'develop' into request_logging | Mark Haines | 2014-10-30 | 1 | -3/+4 |
|\ | | | | | | | | | Conflicts: synapse/config/logger.py | ||||
| * | Fix pep8 warnings | Mark Haines | 2014-10-30 | 1 | -4/+7 |
| | | |||||
* | | Add a request-id to each log line | Mark Haines | 2014-10-30 | 1 | -11/+15 |
|/ | |||||
* | Add get_json method to 3pid http client. Better logging for errors in 3pid ↵ | Mark Haines | 2014-10-20 | 1 | -1/+39 |
| | | | | requests | ||||
* | remove debugging logging for signing requests | Mark Haines | 2014-10-14 | 1 | -4/+0 |
| | |||||
* | Verify signatures for server2server requests | Mark Haines | 2014-10-13 | 1 | -3/+7 |
| | |||||
* | SYN-75 sign at the request level rather than the transaction level | Mark Haines | 2014-10-13 | 1 | -7/+45 |
| | |||||
* | Replace on_send_callback with something a bit clearer so that we can sign ↵ | Mark Haines | 2014-10-13 | 1 | -11/+35 |
| | | | | messages | ||||
* | Fix pyflakes errors | Mark Haines | 2014-10-02 | 1 | -8/+2 |
| | |||||
* | Add a keyword argument to get_json to avoid retrying on DNS failures. Rather ↵ | Mark Haines | 2014-10-02 | 1 | -8/+1 |
| | | | | than passing MatrixHttpClient.RETRY_DNS_LOOKUP_FAILURES as a fake query string parameter | ||||
* | Split PlainHttpClient into separate clients for talking to Identity servers ↵ | Mark Haines | 2014-10-02 | 1 | -144/+146 |
| | | | | and talking to Capatcha servers | ||||
* | remove "red", "blue" and "green" server_name mappings | Mark Haines | 2014-10-01 | 1 | -7/+0 |
| | |||||
* | Fix 'age' key to update on retries | Erik Johnston | 2014-09-15 | 1 | -3/+10 |
| | |||||
* | Captchas now work on registration. Missing x-forwarded-for config arg ↵ | Kegan Dougal | 2014-09-05 | 1 | -1/+27 |
| | | | | support. Missing reloading a new captcha on the web client / displaying a sensible error message. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into develop | David Baker | 2014-09-03 | 1 | -4/+22 |
|\ | | | | | | | | | Conflicts: synapse/http/client.py | ||||
| * | fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵ | Matthew Hodgson | 2014-09-03 | 1 | -1/+1 |
| | | | | | | | | hasn't been incorporated in time for launch. | ||||
| * | Make retrying requests on DNS failures configurable, and turn off retrying ↵ | Kegan Dougal | 2014-09-03 | 1 | -6/+19 |
| | | | | | | | | only in directory.get_association | ||||
| * | hs: Updated synapse.http.client to handle DNSLookupErrors and bail immediately. | Kegan Dougal | 2014-09-03 | 1 | -1/+6 |
| | | |||||
* | | Add support for registering with a threepid to the HS (get credentials from ↵ | David Baker | 2014-09-03 | 1 | -5/+35 |
|/ | | | | the client and check them against an ID server). | ||||
* | Fix SSL for federation http client | Mark Haines | 2014-09-01 | 1 | -1/+1 |
| | |||||
* | Enable SSL for s2s http client | Mark Haines | 2014-09-01 | 1 | -2/+6 |
| | |||||
* | fix http client GET parameters; somehow missing named param. how could this ↵ | Matthew Hodgson | 2014-08-14 | 1 | -2/+2 |
| | | | | have ever worked!? | ||||
* | Update get_json()'s documentation to match the actual observed behaviour | Paul "LeoNerd" Evans | 2014-08-13 | 1 | -4/+3 |
| | |||||
* | add in whitespace after copyright statements to improve legibility | Matthew Hodgson | 2014-08-13 | 1 | -0/+1 |
| | |||||
* | Reference Matrix Home Server | matrix.org | 2014-08-12 | 1 | -0/+246 |