Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHG01206460897a: server: indent block that's about to get conditionalized
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
yuja |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
env[r'REQUEST_URI'] = self.path | env[r'REQUEST_URI'] = self.path | ||||
env[r'SCRIPT_NAME'] = self.server.prefix | env[r'SCRIPT_NAME'] = self.server.prefix | ||||
env[r'PATH_INFO'] = path[len(self.server.prefix):] | env[r'PATH_INFO'] = path[len(self.server.prefix):] | ||||
env[r'REMOTE_HOST'] = self.client_address[0] | env[r'REMOTE_HOST'] = self.client_address[0] | ||||
env[r'REMOTE_ADDR'] = self.client_address[0] | env[r'REMOTE_ADDR'] = self.client_address[0] | ||||
if query: | if query: | ||||
env[r'QUERY_STRING'] = query | env[r'QUERY_STRING'] = query | ||||
if True: | |||||
if self.headers.typeheader is None: | if self.headers.typeheader is None: | ||||
env[r'CONTENT_TYPE'] = self.headers.type | env[r'CONTENT_TYPE'] = self.headers.type | ||||
else: | else: | ||||
env[r'CONTENT_TYPE'] = self.headers.typeheader | env[r'CONTENT_TYPE'] = self.headers.typeheader | ||||
length = self.headers.getheader('content-length') | length = self.headers.getheader('content-length') | ||||
if length: | if length: | ||||
env[r'CONTENT_LENGTH'] = length | env[r'CONTENT_LENGTH'] = length | ||||
for header in [h for h in self.headers.keys() | for header in [h for h in self.headers.keys() | ||||
if h not in ('content-type', 'content-length')]: | if h not in ('content-type', 'content-length')]: | ||||
hkey = r'HTTP_' + header.replace(r'-', r'_').upper() | hkey = r'HTTP_' + header.replace(r'-', r'_').upper() | ||||
hval = self.headers.get(header) | hval = self.headers.get(header) | ||||
hval = hval.replace(r'\n', r'').strip() | hval = hval.replace(r'\n', r'').strip() | ||||
if hval: | if hval: |