[networking] Fix POST requests with zero-length payloads (#7648)

Bugfix for 227bf1a33b

Authored by: bashonly
This commit is contained in:
bashonly
2023-07-20 08:23:30 -05:00
committed by GitHub
parent 613dbce177
commit 71baa490eb
4 changed files with 14 additions and 3 deletions

View File

@@ -425,7 +425,7 @@ class Request:
raise TypeError('headers must be a mapping')
def update(self, url=None, data=None, headers=None, query=None):
self.data = data or self.data
self.data = data if data is not None else self.data
self.headers.update(headers or {})
self.url = update_url_query(url or self.url, query or {})