Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _build_url(self, path):
else:
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!

streamed=False, files=None, **kwargs):
"""Make an HTTP request to the Gitlab server.

Expand Down