# HG changeset patch # User Marcin Kuzminski # Date 2019-07-18 16:12:41 # Node ID 6741e7c06989911065ec106c2d0c4c33fc4d6d2c # Parent 08fb352012215ec5e12b7a9e4551fe9ee2903498 vcs-http: set user-agent diff --git a/rhodecode/lib/vcs/__init__.py b/rhodecode/lib/vcs/__init__.py --- a/rhodecode/lib/vcs/__init__.py +++ b/rhodecode/lib/vcs/__init__.py @@ -27,6 +27,7 @@ import logging import urlparse from cStringIO import StringIO +import rhodecode from rhodecode.lib.vcs.conf import settings from rhodecode.lib.vcs.backends import get_vcs_instance, get_backend from rhodecode.lib.vcs.exceptions import ( @@ -141,6 +142,7 @@ class CurlSession(object): curl.setopt(curl.HTTPHEADER, ["Expect:"]) curl.setopt(curl.TCP_NODELAY, True) curl.setopt(curl.PROTOCOLS, curl.PROTO_HTTP) + curl.setopt(curl.USERAGENT, 'RhodeCode HTTP {}'.format(rhodecode.__version__)) self._curl = curl def post(self, url, data, allow_redirects=False):