From ec68aa303e89398ba34bbe01f3fbd1ac1fc441f3 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Tue, 16 Jun 2015 11:33:10 +0200 Subject: http2: implement error response --- libpathod/pathod.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libpathod/pathod.py') 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: -- cgit v1.2.3