Show More
@@ -221,6 +221,12 b' class httprepository(remoterepository):' | |||||
221 | qs = '?%s' % urllib.urlencode(q) |
|
221 | qs = '?%s' % urllib.urlencode(q) | |
222 | cu = "%s%s" % (self._url, qs) |
|
222 | cu = "%s%s" % (self._url, qs) | |
223 | try: |
|
223 | try: | |
|
224 | if data: | |||
|
225 | if isinstance(data, file): | |||
|
226 | # urllib2 needs string or buffer when using a proxy | |||
|
227 | data.seek(0) | |||
|
228 | data = data.read() | |||
|
229 | self.ui.debug(_("sending %d bytes\n") % len(data)) | |||
224 | resp = urllib2.urlopen(urllib2.Request(cu, data, headers)) |
|
230 | resp = urllib2.urlopen(urllib2.Request(cu, data, headers)) | |
225 | except urllib2.HTTPError, inst: |
|
231 | except urllib2.HTTPError, inst: | |
226 | if inst.code == 401: |
|
232 | if inst.code == 401: |
General Comments 0
You need to be logged in to leave comments.
Login now