我也解决不了,所以直接在urllib的扩展那里加了个删除直接强制修改
\Python\Python39\Lib\urllib\request.py
1330行左右在
headers["Connection"] = "close"
headers = {name.title(): val for name, val in headers.items()}
的下面加上自己想小写的那一部分,例如我想把uuid小写就是这样写的:
headers["Connection"] = "close"
headers = {name.title(): val for name, val in headers.items()}
if headers['Uuid'] is not None:
headers['uuid']=headers['Uuid']
del headers['Uuid']