mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #16464: reset Request's Content-Length header on .data change.
It will be recalculated on sending request to HTTP server. Patch by Alexey Kachayev
This commit is contained in:
parent
9a270d9741
commit
bff98fe536
3 changed files with 72 additions and 2 deletions
|
@ -408,6 +408,10 @@ request.
|
|||
|
||||
The entity body for the request, or None if not specified.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Changing value of :attr:`Request.data` now deletes "Content-Length"
|
||||
header if it was previously set or calculated.
|
||||
|
||||
.. attribute:: Request.unverifiable
|
||||
|
||||
boolean, indicates whether the request is unverifiable as defined
|
||||
|
@ -456,6 +460,12 @@ request.
|
|||
unredirected).
|
||||
|
||||
|
||||
.. method:: Request.remove_header(header)
|
||||
|
||||
Remove named header from the request instance (both from regular and
|
||||
unredirected headers).
|
||||
|
||||
|
||||
.. method:: Request.get_full_url()
|
||||
|
||||
Return the URL given in the constructor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue