Fix line lengths

main
Bob Mottram 2021-01-25 11:18:21 +00:00
parent 7a2a333126
commit 7feb38e382
1 changed files with 8 additions and 4 deletions

View File

@ -9876,8 +9876,10 @@ class PubServer(BaseHTTPRequestHandler):
def do_GET(self):
callingDomain = self.server.domainFull
if self.headers.get('Host'):
# IDNA decoding is an idempotent operation so this should not break 'normal' domains.
# For non-IDNA domains perhaps this behaviour should be disabled: TODO add config option?
# IDNA decoding is an idempotent operation so this
# should not break 'normal' domains.
# For non-IDNA domains perhaps this behaviour should
# be disabled: TODO add config option?
callingDomain = idna.decode(self.headers['Host'])
if self.server.onionDomain:
if callingDomain != self.server.domain and \
@ -12037,7 +12039,8 @@ class PubServer(BaseHTTPRequestHandler):
def do_HEAD(self):
callingDomain = self.server.domainFull
if self.headers.get('Host'):
# As in the GET handler this should be idempotent but for security maybe make configurable.
# As in the GET handler this should be idempotent but
# for security maybe make configurable.
callingDomain = idna.decode(self.headers['Host'])
if self.server.onionDomain:
if callingDomain != self.server.domain and \
@ -12989,7 +12992,8 @@ class PubServer(BaseHTTPRequestHandler):
callingDomain = self.server.domainFull
if self.headers.get('Host'):
# As notes in the GET handler, this should be idempotent but should be configurable just in case
# As notes in the GET handler, this should be idempotent
# but should be configurable just in case
callingDomain = idna.decode(self.headers['Host'])
if self.server.onionDomain:
if callingDomain != self.server.domain and \