aboutsummaryrefslogtreecommitdiffstats
path: root/examples/upsidedownternet.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/upsidedownternet.py')
-rw-r--r--examples/upsidedownternet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/upsidedownternet.py b/examples/upsidedownternet.py
index e8444c83..f2e73047 100644
--- a/examples/upsidedownternet.py
+++ b/examples/upsidedownternet.py
@@ -4,7 +4,7 @@ from libmproxy.models import decoded
def response(context, flow):
- if flow.response.headers.get_first("content-type", "").startswith("image"):
+ if flow.response.headers.get("content-type", "").startswith("image"):
with decoded(flow.response): # automatically decode gzipped responses.
try:
s = cStringIO.StringIO(flow.response.content)
@@ -12,6 +12,6 @@ def response(context, flow):
s2 = cStringIO.StringIO()
img.save(s2, "png")
flow.response.content = s2.getvalue()
- flow.response.headers["content-type"] = ["image/png"]
+ flow.response.headers["content-type"] = "image/png"
except: # Unknown image types etc.
pass