Skip to content

Commit

Permalink
Merge pull request #138 from uploadcare/expand_user_agent
Browse files Browse the repository at this point in the history
add pubkey to 'User-Agent' reguest header
  • Loading branch information
sharov committed May 8, 2018
2 parents e7100b8 + 266e0a3 commit 12fc9ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unreleased

- Update bundled widget to version ``3.3.0``. See `widget changelog`_.
- Update links to the Uploadcare site
- Expand data format in 'User-Agent' request header.

2.4.0
~~~~~
Expand Down
9 changes: 5 additions & 4 deletions pyuploadcare/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ def _build_user_agent():
extension_info = ''
if conf.user_agent_extension:
extension_info = '; {0}'.format(conf.user_agent_extension)
return 'PyUploadcare/{0} ({1}/{2}{3})'.format(__version__,
python_implementation(),
python_version(),
extension_info)
return 'PyUploadcare/{0}/{1} ({2}/{3}{4})'.format(__version__,
conf.pub_key,
python_implementation(),
python_version(),
extension_info)


def rest_request(verb, path, data=None, timeout=conf.DEFAULT,
Expand Down

0 comments on commit 12fc9ce

Please sign in to comment.