This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Edit SimpleHttpClient to reference that header keys can be passed as str or bytes#6077
Merged
anoadragon453 merged 5 commits intodevelopfrom Sep 27, 2019
Merged
Edit SimpleHttpClient to reference that header keys can be passed as str or bytes#6077anoadragon453 merged 5 commits intodevelopfrom
anoadragon453 merged 5 commits intodevelopfrom
Conversation
richvdh
reviewed
Sep 23, 2019
| @@ -0,0 +1 @@ | |||
| Ensure header dicts passed to SimpleHttpClient using `bytes` instead of `str` for keys. No newline at end of file | |||
Member
There was a problem hiding this comment.
this should match the PR which introduced the bug (#5976)
richvdh
previously requested changes
Sep 23, 2019
Member
richvdh
left a comment
There was a problem hiding this comment.
I'm not quite sure what this is for. AFAIK the SimpleHttpClient methods accept either str or bytes for both the header name and the values
Certainly the docstring isn't clear about this, and I wouldn't be hugely averse to us doing a bit of a cleanup on it - but (a) it seems odd to change the header name and not the value, and (b) just changing one header name instance doesn't seem to achieve much.
Member
Author
|
I've updated the PR to only edit the docstrings now, as I think that would've saved me from this confusion. |
richvdh
previously requested changes
Sep 26, 2019
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Header dicts should have bytes as the key in theheadersdict, not astr.