mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Merge pull request #1155 from nyuszika7h/ipv4-mapped-addr-fix
httpserver: Strip IPv4-mapped IPv6 addresses
This commit is contained in:
commit
21da27a846
@ -258,6 +258,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