Skip to content

Conversation

@beyondliu
Copy link
Contributor

No description provided.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, sorry. So this looks good. Thanks!

@gpocentek gpocentek merged commit 6dd8774 into python-gitlab:master Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants