Skip to content
Open
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions tests/test_identity_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ def log_message(self, format, *args):
pass

def do_POST(self):
# Consume the request body before replying. Closing a socket
# with unread data makes the OS send RST, which can discard the
# response already sitting in the client's receive queue - the
# source of a load-sensitive 502 failure in this test.
self.rfile.read(int(self.headers.get("Content-Length") or 0))
seen["authorization"] = self.headers.get("Authorization")
seen["agent_token"] = self.headers.get("X-Agent-Token")
body = b'event: message\r\ndata: {"jsonrpc":"2.0","id":1,"result":{"ok":true}}\r\n\r\n'
Expand Down