mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
don't use http.client.HTTPResponse.getheader() to get the content-type header, because it can return a comma-delimited string
This commit is contained in:
parent
a8adaaf527
commit
1bca9d0324
2
setup.py
2
setup.py
@ -49,7 +49,7 @@ except:
|
||||
|
||||
setuptools.setup(
|
||||
name='warcprox',
|
||||
version='2.2b1.dev98',
|
||||
version='2.2b1.dev99',
|
||||
description='WARC writing MITM HTTP/S proxy',
|
||||
url='https://github.com/internetarchive/warcprox',
|
||||
author='Noah Levitt',
|
||||
|
@ -192,7 +192,7 @@ class WarcProxyHandler(warcprox.mitmproxy.MitmProxyHandler):
|
||||
warcprox_meta=warcprox_meta, status=prox_rec_res.status,
|
||||
size=prox_rec_res.recorder.len,
|
||||
client_ip=self.client_address[0],
|
||||
content_type=prox_rec_res.getheader("Content-Type"),
|
||||
content_type=prox_rec_res.headers.get("Content-Type"),
|
||||
method=self.command, timestamp=timestamp, host=self.hostname,
|
||||
duration=datetime.datetime.utcnow()-timestamp)
|
||||
self.server.recorded_url_q.put(recorded_url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user