Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Support OIDC backchannel logouts #11414

Merged
merged 20 commits into from
Oct 31, 2022
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix unit tests on old version of Twisted
There was an issue before Twisted 20.3.0, where request.args would not
be filled if the `Content-Length` header was missing. I fixed some unit
tests by adding this header in `make_request`.
  • Loading branch information
sandhose committed Oct 26, 2022
commit 55076e1b22b9a8a3479864629ec46af19ac44894
6 changes: 6 additions & 0 deletions tests/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ def make_request(
# Twisted expects to be at the end of the content when parsing the request.
req.content.seek(0, SEEK_END)

# Old version of Twisted (<20.3.0) have issues with parsing x-www-form-urlencoded
# bodies if the Content-Length header is missing
req.requestHeaders.addRawHeader(
b"Content-Length", str(len(content)).encode("ascii")
)

if access_token:
req.requestHeaders.addRawHeader(
b"Authorization", b"Bearer " + access_token.encode("ascii")
Expand Down