You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
requests: Do not leak header modifications when calling request.
The requests() function takes a headers dict argument
(call-by-reference). This object is then modified in the function. For
instance the host is added and authentication information. Such behavior
is not expected. It is also problematic:
- Modifications of the header dictionary will be visible on the caller
site.
- When reusing the same (supposedly read-only) headers object for
differenct calls, the second call will apparently re-use wrong headers
from the previous call and may fail.
This patch should also fix#839. Unfortunately the copy operation does
not preserve the key order and we have to touch the existing test cases.
Signed-off-by: Richard Weickelt <[email protected]>
0 commit comments