Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 6787:dbb00e91c327
add an Accept header to the http client
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 29 Jun 2008 23:02:02 +0200 |
parents | c5580db9c3aa |
children | 9141bebefe3e |
comparison
equal
deleted
inserted
replaced
6786:97e214dccaa9 | 6787:dbb00e91c327 |
---|---|
266 httpdigestauthhandler(passmgr))) | 266 httpdigestauthhandler(passmgr))) |
267 opener = urllib2.build_opener(*handlers) | 267 opener = urllib2.build_opener(*handlers) |
268 | 268 |
269 # 1.0 here is the _protocol_ version | 269 # 1.0 here is the _protocol_ version |
270 opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] | 270 opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] |
271 opener.addheaders.append(('Accept', 'application/mercurial-0.1')) | |
271 urllib2.install_opener(opener) | 272 urllib2.install_opener(opener) |
272 | 273 |
273 def url(self): | 274 def url(self): |
274 return self.path | 275 return self.path |
275 | 276 |