Mercurial > public > mercurial-scm > hg
comparison mercurial/keepalive.py @ 37688:e266e75d77dc
keepalive: add ** overlooked in 83250442dc81
Caught by Yuya in D3326.
Differential Revision: https://phab.mercurial-scm.org/D3372
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Apr 2018 10:43:19 -0400 |
parents | 83250442dc81 |
children | d6d094259d9c |
comparison
equal
deleted
inserted
replaced
37687:8872d46643b6 | 37688:e266e75d77dc |
---|---|
324 try: | 324 try: |
325 if urllibcompat.hasdata(req): | 325 if urllibcompat.hasdata(req): |
326 data = urllibcompat.getdata(req) | 326 data = urllibcompat.getdata(req) |
327 h.putrequest( | 327 h.putrequest( |
328 req.get_method(), urllibcompat.getselector(req), | 328 req.get_method(), urllibcompat.getselector(req), |
329 skipheaders) | 329 **skipheaders) |
330 if r'content-type' not in headers: | 330 if r'content-type' not in headers: |
331 h.putheader(r'Content-type', | 331 h.putheader(r'Content-type', |
332 r'application/x-www-form-urlencoded') | 332 r'application/x-www-form-urlencoded') |
333 if r'content-length' not in headers: | 333 if r'content-length' not in headers: |
334 h.putheader(r'Content-length', r'%d' % len(data)) | 334 h.putheader(r'Content-length', r'%d' % len(data)) |
335 else: | 335 else: |
336 h.putrequest( | 336 h.putrequest( |
337 req.get_method(), urllibcompat.getselector(req), | 337 req.get_method(), urllibcompat.getselector(req), |
338 skipheaders) | 338 **skipheaders) |
339 except socket.error as err: | 339 except socket.error as err: |
340 raise urlerr.urlerror(err) | 340 raise urlerr.urlerror(err) |
341 for k, v in headers.items(): | 341 for k, v in headers.items(): |
342 h.putheader(k, v) | 342 h.putheader(k, v) |
343 h.endheaders() | 343 h.endheaders() |