Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/server.py @ 34718:01206460897a
server: indent block that's about to get conditionalized
Differential Revision: https://phab.mercurial-scm.org/D1083
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Oct 2017 15:53:36 -0400 |
parents | 8782076874f5 |
children | 6e1b05692b2c |
comparison
equal
deleted
inserted
replaced
34717:06b52671552b | 34718:01206460897a |
---|---|
128 env[r'REMOTE_HOST'] = self.client_address[0] | 128 env[r'REMOTE_HOST'] = self.client_address[0] |
129 env[r'REMOTE_ADDR'] = self.client_address[0] | 129 env[r'REMOTE_ADDR'] = self.client_address[0] |
130 if query: | 130 if query: |
131 env[r'QUERY_STRING'] = query | 131 env[r'QUERY_STRING'] = query |
132 | 132 |
133 if self.headers.typeheader is None: | 133 if True: |
134 env[r'CONTENT_TYPE'] = self.headers.type | 134 if self.headers.typeheader is None: |
135 else: | 135 env[r'CONTENT_TYPE'] = self.headers.type |
136 env[r'CONTENT_TYPE'] = self.headers.typeheader | 136 else: |
137 length = self.headers.getheader('content-length') | 137 env[r'CONTENT_TYPE'] = self.headers.typeheader |
138 length = self.headers.getheader('content-length') | |
138 if length: | 139 if length: |
139 env[r'CONTENT_LENGTH'] = length | 140 env[r'CONTENT_LENGTH'] = length |
140 for header in [h for h in self.headers.keys() | 141 for header in [h for h in self.headers.keys() |
141 if h not in ('content-type', 'content-length')]: | 142 if h not in ('content-type', 'content-length')]: |
142 hkey = r'HTTP_' + header.replace(r'-', r'_').upper() | 143 hkey = r'HTTP_' + header.replace(r'-', r'_').upper() |