Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG375c8debe336: httppeer: pass url to urllib as native str, not bytes
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/httppeer.py (2 lines) |
headersize or 1024) | headersize or 1024) | ||||
for header, value in protoheaders: | for header, value in protoheaders: | ||||
headers[header] = value | headers[header] = value | ||||
varyheaders.append(header) | varyheaders.append(header) | ||||
if varyheaders: | if varyheaders: | ||||
headers[r'Vary'] = r','.join(varyheaders) | headers[r'Vary'] = r','.join(varyheaders) | ||||
req = self._requestbuilder(cu, data, headers) | req = self._requestbuilder(pycompat.strurl(cu), data, headers) | ||||
if data is not None: | if data is not None: | ||||
self.ui.debug("sending %s bytes\n" % size) | self.ui.debug("sending %s bytes\n" % size) | ||||
req.add_unredirected_header('Content-Length', '%d' % size) | req.add_unredirected_header('Content-Length', '%d' % size) | ||||
try: | try: | ||||
resp = self._urlopener.open(req) | resp = self._urlopener.open(req) | ||||
except urlerr.httperror as inst: | except urlerr.httperror as inst: | ||||
if inst.code == 401: | if inst.code == 401: |