Patchwork D2312: hgweb: header dict entries are native strings

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 5:42 a.m.
Message ID <differential-rev-PHID-DREV-3orcusayyvuhdng7aiaj-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28052/
State Superseded
Headers show

Comments

phabricator - Feb. 18, 2018, 5:42 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/hgweb/common.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 18, 2018, 11:54 a.m.
pulkit added a comment.


  This one also should be # skip-blame.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -45,7 +45,7 @@ 
     authentication info). Return if op allowed, else raise an ErrorResponse
     exception.'''
 
-    user = req.env.get('REMOTE_USER')
+    user = req.env.get(r'REMOTE_USER')
 
     deny_read = hgweb.configlist('web', 'deny_read')
     if deny_read and (not user or ismember(hgweb.repo.ui, user, deny_read)):
@@ -61,7 +61,7 @@ 
         return
 
     # enforce that you can only push using POST requests
-    if req.env['REQUEST_METHOD'] != 'POST':
+    if req.env[r'REQUEST_METHOD'] != r'POST':
         msg = 'push requires POST request'
         raise ErrorResponse(HTTP_METHOD_NOT_ALLOWED, msg)