mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 22:03:50 -05:00
Fix typos and spelling errors. (#8639)
This commit is contained in:
parent
c850dd9a8e
commit
34a5696f93
41 changed files with 63 additions and 60 deletions
|
|
@ -172,7 +172,7 @@ class WellKnownResolver:
|
|||
had_valid_well_known = self._had_valid_well_known_cache.get(server_name, False)
|
||||
|
||||
# We do this in two steps to differentiate between possibly transient
|
||||
# errors (e.g. can't connect to host, 503 response) and more permenant
|
||||
# errors (e.g. can't connect to host, 503 response) and more permanent
|
||||
# errors (such as getting a 404 response).
|
||||
response, body = await self._make_well_known_request(
|
||||
server_name, retry=had_valid_well_known
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ class MatrixFederationHttpClient:
|
|||
"""
|
||||
Builds the Authorization headers for a federation request
|
||||
Args:
|
||||
destination (bytes|None): The desination homeserver of the request.
|
||||
destination (bytes|None): The destination homeserver of the request.
|
||||
May be None if the destination is an identity server, in which case
|
||||
destination_is must be non-None.
|
||||
method (bytes): The HTTP method of the request
|
||||
|
|
@ -640,7 +640,7 @@ class MatrixFederationHttpClient:
|
|||
backoff_on_404=False,
|
||||
try_trailing_slash_on_400=False,
|
||||
):
|
||||
""" Sends the specifed json data using PUT
|
||||
""" Sends the specified json data using PUT
|
||||
|
||||
Args:
|
||||
destination (str): The remote server to send the HTTP request
|
||||
|
|
@ -729,7 +729,7 @@ class MatrixFederationHttpClient:
|
|||
ignore_backoff=False,
|
||||
args={},
|
||||
):
|
||||
""" Sends the specifed json data using POST
|
||||
""" Sends the specified json data using POST
|
||||
|
||||
Args:
|
||||
destination (str): The remote server to send the HTTP request
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ in_flight_requests_db_sched_duration = Counter(
|
|||
# The set of all in flight requests, set[RequestMetrics]
|
||||
_in_flight_requests = set()
|
||||
|
||||
# Protects the _in_flight_requests set from concurrent accesss
|
||||
# Protects the _in_flight_requests set from concurrent access
|
||||
_in_flight_requests_lock = threading.Lock()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class HttpServer:
|
|||
""" Register a callback that gets fired if we receive a http request
|
||||
with the given method for a path that matches the given regex.
|
||||
|
||||
If the regex contains groups these gets passed to the calback via
|
||||
If the regex contains groups these gets passed to the callback via
|
||||
an unpacked tuple.
|
||||
|
||||
Args:
|
||||
|
|
@ -241,7 +241,7 @@ class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
|
|||
|
||||
async def _async_render(self, request: Request):
|
||||
"""Delegates to `_async_render_<METHOD>` methods, or returns a 400 if
|
||||
no appropriate method exists. Can be overriden in sub classes for
|
||||
no appropriate method exists. Can be overridden in sub classes for
|
||||
different routing.
|
||||
"""
|
||||
# Treat HEAD requests as GET requests.
|
||||
|
|
@ -386,7 +386,7 @@ class JsonResource(DirectServeJsonResource):
|
|||
async def _async_render(self, request):
|
||||
callback, servlet_classname, group_dict = self._get_handler_for_request(request)
|
||||
|
||||
# Make sure we have an appopriate name for this handler in prometheus
|
||||
# Make sure we have an appropriate name for this handler in prometheus
|
||||
# (rather than the default of JsonResource).
|
||||
request.request_metrics.name = servlet_classname
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,9 @@ class SynapseRequest(Request):
|
|||
yield
|
||||
except Exception:
|
||||
# this should already have been caught, and sent back to the client as a 500.
|
||||
logger.exception("Asynchronous messge handler raised an uncaught exception")
|
||||
logger.exception(
|
||||
"Asynchronous message handler raised an uncaught exception"
|
||||
)
|
||||
finally:
|
||||
# the request handler has finished its work and either sent the whole response
|
||||
# back, or handed over responsibility to a Producer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue