diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-16 11:33:10 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-16 11:33:10 +0200 |
commit | ec68aa303e89398ba34bbe01f3fbd1ac1fc441f3 (patch) | |
tree | 9d6d762bdd34867aa1b1e308d68e55fdced98658 /libpathod/pathod.py | |
parent | a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e (diff) | |
download | mitmproxy-ec68aa303e89398ba34bbe01f3fbd1ac1fc441f3.tar.gz mitmproxy-ec68aa303e89398ba34bbe01f3fbd1ac1fc441f3.tar.bz2 mitmproxy-ec68aa303e89398ba34bbe01f3fbd1ac1fc441f3.zip |
http2: implement error response
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r-- | libpathod/pathod.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py index 535340cb..b6f04b92 100644 --- a/libpathod/pathod.py +++ b/libpathod/pathod.py @@ -306,8 +306,11 @@ class PathodHandler(tcp.BaseHandler): )]) else: if self.use_http2: - raise NotImplementedError(\ - "HTTP/2 only supports request/response with the craft anchor point.") + anchor_gen = iter([self.make_http_error_response( + "Spec Error", + "HTTP/2 only supports request/response with the craft anchor point: %s" % + self.server.craftanchor + )]) if anchor_gen: |