diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-19 19:20:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-19 19:20:41 +0100 |
commit | a4e1354ec3b0679d37f0a345c11550d17b047156 (patch) | |
tree | 32c2959418a5c949b6b69f4179c97273fe07c1b1 | |
parent | 228cb2511e00badc78eb2356232b40eee54d0dbc (diff) | |
download | curl-bagder/http2-authority-check.tar.gz |
fixup send the RST_STREAM with PROTOCOL_ERROR toobagder/http2-authority-check
-rw-r--r-- | lib/http2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c index 4f18b200f..b5c53cdf6 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -980,8 +980,10 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, /* This is push is not for the same authority that was asked for in * the URL. RFC 7540 section 8.2 says: "A client MUST treat a * PUSH_PROMISE for which the server is not authoritative as a stream - * error" + * error of type PROTOCOL_ERROR." */ + (void)nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, + stream_id, NGHTTP2_PROTOCOL_ERROR); rc = NGHTTP2_ERR_CALLBACK_FAILURE; } free(check); |