Patchwork D1083: server: indent block that's about to get conditionalized

login
register
mail settings
Submitter phabricator
Date Oct. 15, 2017, 4:57 a.m.
Message ID <differential-rev-PHID-DREV-zdvpzjzdhmto4b6ykz4h-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24930/
State Superseded
Headers show

Comments

phabricator - Oct. 15, 2017, 4:57 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/D1083

AFFECTED FILES
  mercurial/hgweb/server.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -130,11 +130,12 @@ 
         if query:
             env[r'QUERY_STRING'] = query
 
-        if self.headers.typeheader is None:
-            env[r'CONTENT_TYPE'] = self.headers.type
-        else:
-            env[r'CONTENT_TYPE'] = self.headers.typeheader
-        length = self.headers.getheader('content-length')
+        if True:
+            if self.headers.typeheader is None:
+                env[r'CONTENT_TYPE'] = self.headers.type
+            else:
+                env[r'CONTENT_TYPE'] = self.headers.typeheader
+            length = self.headers.getheader('content-length')
         if length:
             env[r'CONTENT_LENGTH'] = length
         for header in [h for h in self.headers.keys()