Kodi integration suddenly "can't connect"

Maybe something’s up there. Kodi 19 has been awfully unstable with my plugins, too. I’m running:

kodi 19.3-2
core-2021.12.7

I have dug a bit deeper and found that the underlying library used in Home Assistant for Kodi (pykodi) is complaining about a duplicate Content-Length HTTP header:

jsonrpc_base.jsonrpc.TransportError: ("Error calling method 'JSONRPC.Ping': Transport Error", ClientResponseError(RequestInfo(url=URL('http://192.168.0.100:8080/jsonrpc'), method='POST', headers=<CIMultiDictProxy('Host': '192.168.0.100:8080', 'Content-Type': 'application/json', 'Accept': 'application/json-rpc', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.9 aiohttp/3.8.1', 'Authorization': 'Basic ******', 'Content-Length': '104')>, real_url=URL('http://192.168.0.100:8080/jsonrpc')), (), status=400, message='Duplicate Content-Length'))

Sure enough, there are two Content-Length headers on the JSON-RPC responses:

No idea how to fix this, but it seems to be a Kodi problem. If anyone else stumbles across this problem, see if you can reproduce and report back here: