Skip to content

Commit 3b19391

Browse files
committed
Adding version to the user-agent
1 parent 6c83c2b commit 3b19391

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bin/stashcp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import shutil
1616
import logging
1717
from urlparse import urlparse
1818

19+
# Version information for user-agent
20+
VERSION = "5.1.1"
21+
1922
main_redirector = "root://redirector.osgstorage.org"
2023
stash_origin = "root://stash.osgconnect.net"
2124
writeback_host = "http://stash-xrd.osgconnect.net:1094"
@@ -404,7 +407,7 @@ def get_best_stashcache():
404407
append_text = "api/v1.0/geo/stashcp"
405408

406409
# Headers for the HTTP request
407-
headers = {'Cache-control': 'max-age=0', 'User-Agent': 'stashcp/4.3.1'}
410+
headers = {'Cache-control': 'max-age=0', 'User-Agent': 'stashcp/{}'.format(VERSION)}
408411

409412
# Randomize the geo ip sites
410413
random.shuffle(geo_ip_sites)

0 commit comments

Comments
 (0)