mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
httpserver: Strip IPv4-mapped IPv6 addresses
This commit is contained in:
parent
7d7945e719
commit
f8328be5cb
@ -252,6 +252,11 @@ class SupyHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||||||
def do_HEAD(self):
|
def do_HEAD(self):
|
||||||
self.do_X('doHead')
|
self.do_X('doHead')
|
||||||
|
|
||||||
|
def address_string(self):
|
||||||
|
s = super(SupyHTTPRequestHandler, self).address_string()
|
||||||
|
|
||||||
|
# Strip IPv4-mapped IPv6 addresses such as ::ffff:127.0.0.1
|
||||||
|
return s.lstrip('::ffff:')
|
||||||
|
|
||||||
def log_message(self, format, *args):
|
def log_message(self, format, *args):
|
||||||
log.info('HTTP request: %s - %s' %
|
log.info('HTTP request: %s - %s' %
|
||||||
|
Loading…
Reference in New Issue
Block a user