forked from MechanicalSoup/MechanicalSoup
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't override a Referer field that a user passes in. Note that since HTTP headers are case-insensitive, use requests' CaseInsensitiveDict to handle this. Furthermore, don't modify the caller's **kwargs, the caller should assume we do not modify the submitted dict, so make a copy first. Do this in _merge_referer() helper function, as we anticipate needing this in other functions when MechanicalSoup#362 is fixed. Add a test for overriding Referers.
- Loading branch information
1 parent
0eb9495
commit c52e3d9
Showing
2 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters