Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
re6stnet
Commits
d7bcf391
Commit
d7bcf391
authored
Dec 18, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send User-Agent header when querying the registry
parent
7487cd46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
re6st/registry.py
re6st/registry.py
+3
-1
No files found.
re6st/registry.py
View file @
d7bcf391
...
...
@@ -27,7 +27,7 @@ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from
email.mime.text
import
MIMEText
from
OpenSSL
import
crypto
from
urllib
import
splittype
,
splithost
,
splitport
,
urlencode
from
.
import
ctl
,
tunnel
,
utils
from
.
import
ctl
,
tunnel
,
utils
,
version
HMAC_HEADER
=
"Re6stHMAC"
RENEW_PERIOD
=
30
*
86400
...
...
@@ -448,6 +448,7 @@ class RegistryServer(object):
class
RegistryClient
(
object
):
_hmac
=
None
user_agent
=
"re6stnet/"
+
version
.
version
def
__init__
(
self
,
url
,
key_path
=
None
,
ca
=
None
,
auto_close
=
True
):
self
.
key_path
=
key_path
...
...
@@ -489,6 +490,7 @@ class RegistryClient(object):
else
:
retry
=
False
self
.
_conn
.
putrequest
(
'GET'
,
url
,
skip_accept_encoding
=
1
)
self
.
_conn
.
putheader
(
'User-Agent'
,
self
.
user_agent
)
if
client_prefix
:
self
.
_conn
.
putheader
(
HMAC_HEADER
,
base64
.
b64encode
(
h
))
self
.
_conn
.
endheaders
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment