Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
0ad44acb
Commit
0ad44acb
authored
8 years ago
by
David Baker
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1997 from matrix-org/dbkr/cas_partialdownload
Handle PartialDownloadError in CAS login
parents
5f14e7e9
1ece0627
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/rest/client/v1/login.py
+8
-1
8 additions, 1 deletion
synapse/rest/client/v1/login.py
with
8 additions
and
1 deletion
synapse/rest/client/v1/login.py
+
8
−
1
View file @
0ad44acb
...
...
@@ -34,6 +34,8 @@ from saml2.client import Saml2Client
import
xml.etree.ElementTree
as
ET
from
twisted.web.client
import
PartialDownloadError
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -417,7 +419,12 @@ class CasTicketServlet(ClientV1RestServlet):
"
ticket
"
:
request
.
args
[
"
ticket
"
],
"
service
"
:
self
.
cas_service_url
}
body
=
yield
http_client
.
get_raw
(
uri
,
args
)
try
:
body
=
yield
http_client
.
get_raw
(
uri
,
args
)
except
PartialDownloadError
as
pde
:
# Twisted raises this error if the connection is closed,
# even if that's being used old-http style to signal end-of-data
body
=
pde
.
response
result
=
yield
self
.
handle_cas_response
(
request
,
body
,
client_redirect_url
)
defer
.
returnValue
(
result
)
...
...
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