##// END OF EJS Templates
py3: handle keyword arguments correctly in keepalive.py...
Pulkit Goyal -
r35365:03112a2c default
parent child Browse files
Show More
@@ -322,7 +322,7 b' class KeepAliveHandler(object):'
322 data = urllibcompat.getdata(req)
322 data = urllibcompat.getdata(req)
323 h.putrequest(
323 h.putrequest(
324 req.get_method(), urllibcompat.getselector(req),
324 req.get_method(), urllibcompat.getselector(req),
325 **skipheaders)
325 **pycompat.strkwargs(skipheaders))
326 if 'content-type' not in headers:
326 if 'content-type' not in headers:
327 h.putheader('Content-type',
327 h.putheader('Content-type',
328 'application/x-www-form-urlencoded')
328 'application/x-www-form-urlencoded')
@@ -331,7 +331,7 b' class KeepAliveHandler(object):'
331 else:
331 else:
332 h.putrequest(
332 h.putrequest(
333 req.get_method(), urllibcompat.getselector(req),
333 req.get_method(), urllibcompat.getselector(req),
334 **skipheaders)
334 **pycompat.strkwargs(skipheaders))
335 except socket.error as err:
335 except socket.error as err:
336 raise urlerr.urlerror(err)
336 raise urlerr.urlerror(err)
337 for k, v in headers.items():
337 for k, v in headers.items():
@@ -366,8 +366,8 b' class HTTPResponse(httplib.HTTPResponse)'
366 def __init__(self, sock, debuglevel=0, strict=0, method=None):
366 def __init__(self, sock, debuglevel=0, strict=0, method=None):
367 extrakw = {}
367 extrakw = {}
368 if not pycompat.ispy3:
368 if not pycompat.ispy3:
369 extrakw['strict'] = True
369 extrakw[r'strict'] = True
370 extrakw['buffering'] = True
370 extrakw[r'buffering'] = True
371 httplib.HTTPResponse.__init__(self, sock, debuglevel=debuglevel,
371 httplib.HTTPResponse.__init__(self, sock, debuglevel=debuglevel,
372 method=method, **extrakw)
372 method=method, **extrakw)
373 self.fileno = sock.fileno
373 self.fileno = sock.fileno
General Comments 0
You need to be logged in to leave comments. Login now