mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
comment out unused code that fails in py2
This commit is contained in:
parent
ddb60876a3
commit
859c93f390
2
setup.py
2
setup.py
@ -51,7 +51,7 @@ except:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='warcprox',
|
name='warcprox',
|
||||||
version='2.1b1.dev47',
|
version='2.1b1.dev48',
|
||||||
description='WARC writing MITM HTTP/S proxy',
|
description='WARC writing MITM HTTP/S proxy',
|
||||||
url='https://github.com/internetarchive/warcprox',
|
url='https://github.com/internetarchive/warcprox',
|
||||||
author='Noah Levitt',
|
author='Noah Levitt',
|
||||||
|
@ -60,21 +60,21 @@ import certauth.certauth
|
|||||||
|
|
||||||
import warcprox
|
import warcprox
|
||||||
|
|
||||||
import http.client
|
### uncomment this to block see raw requests going over the wire
|
||||||
orig_send = http.client.HTTPConnection.send
|
# import http.client
|
||||||
def _send(self, data):
|
# orig_send = http.client.HTTPConnection.send
|
||||||
if isinstance(data, bytes):
|
# def _send(self, data):
|
||||||
logging.info('sending data (bytes): ')
|
# if isinstance(data, bytes):
|
||||||
logging.root.handlers[0].stream.buffer.write(data)
|
# logging.info('sending data (bytes): ')
|
||||||
logging.root.handlers[0].stream.buffer.write(b'\n')
|
# logging.root.handlers[0].stream.buffer.write(data)
|
||||||
elif isinstance(data, str):
|
# logging.root.handlers[0].stream.buffer.write(b'\n')
|
||||||
logging.info('sending data (str): ')
|
# elif isinstance(data, str):
|
||||||
logging.root.handlers[0].stream.write(data)
|
# logging.info('sending data (str): ')
|
||||||
logging.root.handlers[0].stream.write('\n')
|
# logging.root.handlers[0].stream.write(data)
|
||||||
else:
|
# logging.root.handlers[0].stream.write('\n')
|
||||||
logging.info('sending data from %s', repr(data))
|
# else:
|
||||||
orig_send(self, data)
|
# logging.info('sending data from %s', repr(data))
|
||||||
### uncomment this to see raw requests going over the wire
|
# orig_send(self, data)
|
||||||
# http.client.HTTPConnection.send = _send
|
# http.client.HTTPConnection.send = _send
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user