Patchwork D2311: keepalive: headers are native strings, mark them as such

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 4:24 p.m.
Message ID <9cd37ed780f6997fb8adb7900363fa9c@localhost.localdomain>
Download mbox | patch
Permalink /patch/28106/
State Not Applicable
Headers show

Comments

phabricator - Feb. 18, 2018, 4:24 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG19a04ca90413: keepalive: headers are native strings, mark them as such (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2311?vs=5829&id=5880

REVISION DETAIL
  https://phab.mercurial-scm.org/D2311

AFFECTED FILES
  mercurial/keepalive.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -324,11 +324,11 @@ 
                 h.putrequest(
                     req.get_method(), urllibcompat.getselector(req),
                     **pycompat.strkwargs(skipheaders))
-                if 'content-type' not in headers:
-                    h.putheader('Content-type',
-                                'application/x-www-form-urlencoded')
-                if 'content-length' not in headers:
-                    h.putheader('Content-length', '%d' % len(data))
+                if r'content-type' not in headers:
+                    h.putheader(r'Content-type',
+                                r'application/x-www-form-urlencoded')
+                if r'content-length' not in headers:
+                    h.putheader(r'Content-length', r'%d' % len(data))
             else:
                 h.putrequest(
                     req.get_method(), urllibcompat.getselector(req),