fix #521 change post_data default value to None#522
Merged
gpocentek merged 1 commit intopython-gitlab:masterfrom Jun 9, 2018
Merged
fix #521 change post_data default value to None#522gpocentek merged 1 commit intopython-gitlab:masterfrom
gpocentek merged 1 commit intopython-gitlab:masterfrom
Conversation
gpocentek
reviewed
Jun 8, 2018
| return '%s%s' % (self._url, path) | ||
|
|
||
| def http_request(self, verb, path, query_data={}, post_data={}, | ||
| def http_request(self, verb, path, query_data={}, post_data=None, |
Contributor
There was a problem hiding this comment.
The default value of post_data for http_post and http_put are also an empty dict, I guess you should change the value to None for those methods as well (http_request is never called directly).
Contributor
Author
There was a problem hiding this comment.
I didn't read the latest code carefully. The version I used is 1.3. But what was causing problem is GET request with a body (by default will be b'{}'), which get rejected by caching servers. PUT and POST requests with a non empty body should be alright. There might be better ways or better places to make the change.
Contributor
There was a problem hiding this comment.
Ah yes, sorry. So this looks good. Thanks!
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.