Skip to content

Commit

Permalink
Add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nhumrich committed Jan 4, 2023
1 parent 527fcb6 commit a70d818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smallprox/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _HTTPServerProtocol(asyncio.Protocol):
""" HTTP Protocol handler.
Should only be used by HTTPServerTransport
"""
__slots__ = ('_transport', 'data', 'http_parser',
__slots__ = ('_transport', 'data', 'http_parser', '_loop',
'client', '_headers', '_url', 'config', 'ssl_forward')

def __init__(self, *, loop, config, ssl_forward=False):
Expand Down Expand Up @@ -144,9 +144,9 @@ def on_headers_complete(self):
headers={'Location': 'https://' + host + self._url.decode(),
'Server': 'small-prox'}))
return
logger.debug('Request from %s and path %s', host, url.path.decode())
ssl = False
ip, port = get_host_and_port(host, url.path.decode(), self.config)
logger.debug(f'Request from {host} and path {url.path.decode()} --> {ip}, {port}')
if port == '0':
if ip.startswith('https://'):
port = 443
Expand Down

0 comments on commit a70d818

Please sign in to comment.