##// END OF EJS Templates
url: use native strings for header values...
Augie Fackler -
r34429:0ee9cf8d default
parent child Browse files
Show More
@@ -19,6 +19,7 b' from . import ('
19 error,
19 error,
20 httpconnection as httpconnectionmod,
20 httpconnection as httpconnectionmod,
21 keepalive,
21 keepalive,
22 pycompat,
22 sslutil,
23 sslutil,
23 util,
24 util,
24 )
25 )
@@ -495,13 +496,13 b' def opener(ui, authinfo=None):'
495 # agent string for anything, clients should be able to define whatever
496 # agent string for anything, clients should be able to define whatever
496 # user agent they deem appropriate.
497 # user agent they deem appropriate.
497 agent = 'mercurial/proto-1.0 (Mercurial %s)' % util.version()
498 agent = 'mercurial/proto-1.0 (Mercurial %s)' % util.version()
498 opener.addheaders = [('User-agent', agent)]
499 opener.addheaders = [(r'User-agent', pycompat.sysstr(agent))]
499
500
500 # This header should only be needed by wire protocol requests. But it has
501 # This header should only be needed by wire protocol requests. But it has
501 # been sent on all requests since forever. We keep sending it for backwards
502 # been sent on all requests since forever. We keep sending it for backwards
502 # compatibility reasons. Modern versions of the wire protocol use
503 # compatibility reasons. Modern versions of the wire protocol use
503 # X-HgProto-<N> for advertising client support.
504 # X-HgProto-<N> for advertising client support.
504 opener.addheaders.append(('Accept', 'application/mercurial-0.1'))
505 opener.addheaders.append((r'Accept', r'application/mercurial-0.1'))
505 return opener
506 return opener
506
507
507 def open(ui, url_, data=None):
508 def open(ui, url_, data=None):
General Comments 0
You need to be logged in to leave comments. Login now