Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
66cdb840
Commit
66cdb840
authored
6 years ago
by
Andrew Morgan
Browse files
Options
Downloads
Patches
Plain Diff
Or perhaps I was the one who was drunk
parent
bec31381
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/http/matrixfederationclient.py
+3
-6
3 additions, 6 deletions
synapse/http/matrixfederationclient.py
with
3 additions
and
6 deletions
synapse/http/matrixfederationclient.py
+
3
−
6
View file @
66cdb840
...
@@ -193,7 +193,6 @@ class MatrixFederationHttpClient(object):
...
@@ -193,7 +193,6 @@ class MatrixFederationHttpClient(object):
self
,
self
,
request
,
request
,
try_trailing_slash_on_400
=
False
,
try_trailing_slash_on_400
=
False
,
backoff_on_404
=
False
,
**
kwargs
):
**
kwargs
):
"""
Wrapper for _send_request which can optionally retry the request
"""
Wrapper for _send_request which can optionally retry the request
upon receiving a combination of a 400 HTTP response code and a
upon receiving a combination of a 400 HTTP response code and a
...
@@ -205,9 +204,6 @@ class MatrixFederationHttpClient(object):
...
@@ -205,9 +204,6 @@ class MatrixFederationHttpClient(object):
try_trailing_slash_on_400 (bool): Whether on receiving a 400
try_trailing_slash_on_400 (bool): Whether on receiving a 400
'
M_UNRECOGNIZED
'
from the server to retry the request with a
'
M_UNRECOGNIZED
'
from the server to retry the request with a
trailing slash appended to the request path.
trailing slash appended to the request path.
backoff_on_404 (bool): Whether to backoff on 404 when making a
request with a trailing slash (only affects request if
try_trailing_slash_on_400 is True).
kwargs (Dict): A dictionary of arguments to pass to
kwargs (Dict): A dictionary of arguments to pass to
`_send_request()`.
`_send_request()`.
...
@@ -585,7 +581,7 @@ class MatrixFederationHttpClient(object):
...
@@ -585,7 +581,7 @@ class MatrixFederationHttpClient(object):
}
}
response
=
yield
self
.
_send_request_with_optional_trailing_slash
(
response
=
yield
self
.
_send_request_with_optional_trailing_slash
(
request
,
try_trailing_slash_on_400
,
backoff_on_404
,
**
send_request_args
)
request
,
try_trailing_slash_on_400
,
**
send_request_args
)
body
=
yield
_handle_json_response
(
body
=
yield
_handle_json_response
(
self
.
hs
.
get_reactor
(),
self
.
default_timeout
,
request
,
response
,
self
.
hs
.
get_reactor
(),
self
.
default_timeout
,
request
,
response
,
...
@@ -701,10 +697,11 @@ class MatrixFederationHttpClient(object):
...
@@ -701,10 +697,11 @@ class MatrixFederationHttpClient(object):
"
retry_on_dns_fail
"
:
retry_on_dns_fail
,
"
retry_on_dns_fail
"
:
retry_on_dns_fail
,
"
timeout
"
:
timeout
,
"
timeout
"
:
timeout
,
"
ignore_backoff
"
:
ignore_backoff
,
"
ignore_backoff
"
:
ignore_backoff
,
"
backoff_on_404
"
:
False
,
}
}
response
=
yield
self
.
_send_request_with_optional_trailing_slash
(
response
=
yield
self
.
_send_request_with_optional_trailing_slash
(
request
,
try_trailing_slash_on_400
,
False
,
**
send_request_args
)
request
,
try_trailing_slash_on_400
,
**
send_request_args
)
body
=
yield
_handle_json_response
(
body
=
yield
_handle_json_response
(
self
.
hs
.
get_reactor
(),
self
.
default_timeout
,
request
,
response
,
self
.
hs
.
get_reactor
(),
self
.
default_timeout
,
request
,
response
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment