Fix f8328be5cb so it actually does what it is supposed to do (lstrip removes characters).

This commit is contained in:
Valentin Lorentz 2015-08-22 11:18:07 +02:00
parent 9c8f05bc16
commit 543732af3a

View File

@ -262,7 +262,11 @@ class SupyHTTPRequestHandler(BaseHTTPRequestHandler):
s = super(SupyHTTPRequestHandler, self).address_string() s = super(SupyHTTPRequestHandler, self).address_string()
# Strip IPv4-mapped IPv6 addresses such as ::ffff:127.0.0.1 # Strip IPv4-mapped IPv6 addresses such as ::ffff:127.0.0.1
return s.lstrip('::ffff:') prefix = '::ffff:'
if s.startswith(prefix):
s = s[len(prefix):]
return s
def log_message(self, format, *args): def log_message(self, format, *args):
log.info('HTTP request: %s - %s' % log.info('HTTP request: %s - %s' %