Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 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
f3d4488
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this implementation of update seems to be different to the currently implemented version. This one is doing
self.add(...)
, the current oneself.__setitem__(...)
. Though add surely makes more sense.f3d4488
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ml31415 that's exactly the point of the PR. To implement an update that doesn't treat the value as a string so the data copied as it was before.
The performance improvement here was just a plus because @sigmavirus24 was concerned about it.
f3d4488
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care too much actually. Nevertheless, the previous implementation is actually what the spec says about what to do with duplicate headers, set-cookie taken aside. Being selective about the header name might be worth implementing, when rewriting the module anyways. See here, e.g. https://github.com/gwik/geventhttpclient/blob/master/src/geventhttpclient/header.py