diff --git a/bazel/external/quiche.BUILD b/bazel/external/quiche.BUILD index a738127058bc9..807089028873c 100644 --- a/bazel/external/quiche.BUILD +++ b/bazel/external/quiche.BUILD @@ -121,6 +121,7 @@ envoy_cc_library( "quiche/http2/adapter/http2_session.h", "quiche/http2/adapter/http2_util.h", "quiche/http2/adapter/http2_visitor_interface.h", + "quiche/http2/adapter/nghttp2.h", "quiche/http2/adapter/nghttp2_adapter.h", "quiche/http2/adapter/nghttp2_callbacks.h", "quiche/http2/adapter/nghttp2_data_provider.h", @@ -146,6 +147,8 @@ envoy_cc_library( ":spdy_core_header_block_lib", ":spdy_core_http2_deframer_lib", ":spdy_core_protocol_lib", + ":spdy_header_byte_listener_interface_lib", + ":spdy_no_op_headers_handler_lib", ], ) @@ -864,6 +867,26 @@ envoy_cc_library( ], ) +envoy_cc_library( + name = "spdy_no_op_headers_handler_lib", + hdrs = ["quiche/spdy/core/no_op_headers_handler.h"], + repository = "@envoy", + visibility = ["//visibility:public"], + deps = [ + ":quiche_common_platform", + ], +) + +envoy_cc_library( + name = "spdy_header_byte_listener_interface_lib", + hdrs = ["quiche/spdy/core/header_byte_listener_interface.h"], + repository = "@envoy", + visibility = ["//visibility:public"], + deps = [ + ":quiche_common_platform", + ], +) + envoy_cc_library( name = "spdy_core_alt_svc_wire_format_lib", srcs = ["quiche/spdy/core/spdy_alt_svc_wire_format.cc"], diff --git a/bazel/external/quiche.patch b/bazel/external/quiche.patch index 8d9666a9adeb4..e69de29bb2d1d 100644 --- a/bazel/external/quiche.patch +++ b/bazel/external/quiche.patch @@ -1,99 +0,0 @@ ---- http2/adapter/callback_visitor.h -+++ http2/adapter/callback_visitor.h -@@ -8,6 +8,10 @@ - #include "absl/container/flat_hash_map.h" - #include "http2/adapter/http2_visitor_interface.h" - #include "http2/adapter/nghttp2_util.h" -+ -+// Required to build on Windows. -+typedef ptrdiff_t ssize_t; -+ - #include "third_party/nghttp2/src/lib/includes/nghttp2/nghttp2.h" - #include "common/platform/api/quiche_export.h" - ---- http2/adapter/http2_protocol.h -+++ http2/adapter/http2_protocol.h -@@ -10,6 +10,8 @@ - #include "absl/types/variant.h" - #include "common/platform/api/quiche_export.h" - -+#undef NO_ERROR -+ - namespace http2 { - namespace adapter { - ---- http2/adapter/nghttp2_callbacks.h -+++ http2/adapter/nghttp2_callbacks.h -@@ -5,6 +5,10 @@ - - #include "http2/adapter/http2_protocol.h" - #include "http2/adapter/nghttp2_util.h" -+ -+// Required to build on Windows. -+typedef ptrdiff_t ssize_t; -+ - #include "third_party/nghttp2/src/lib/includes/nghttp2/nghttp2.h" - - namespace http2 { ---- http2/adapter/nghttp2_data_provider.h -+++ http2/adapter/nghttp2_data_provider.h -@@ -5,6 +5,10 @@ - #include - - #include "http2/adapter/data_source.h" -+ -+// Required to build on Windows. -+typedef ptrdiff_t ssize_t; -+ - #include "third_party/nghttp2/src/lib/includes/nghttp2/nghttp2.h" - - namespace http2 { ---- http2/adapter/nghttp2_session.h -+++ http2/adapter/nghttp2_session.h -@@ -5,6 +5,10 @@ - - #include "http2/adapter/http2_session.h" - #include "http2/adapter/nghttp2_util.h" -+ -+// Required to build on Windows. -+typedef ptrdiff_t ssize_t; -+ - #include "third_party/nghttp2/src/lib/includes/nghttp2/nghttp2.h" - #include "common/platform/api/quiche_export.h" - ---- http2/adapter/nghttp2_util.h -+++ http2/adapter/nghttp2_util.h -@@ -10,6 +10,10 @@ - #include "absl/types/span.h" - #include "http2/adapter/data_source.h" - #include "http2/adapter/http2_protocol.h" - #include "http2/adapter/http2_visitor_interface.h" -+ -+// Required to build on Windows. -+typedef ptrdiff_t ssize_t; -+ - #include "third_party/nghttp2/src/lib/includes/nghttp2/nghttp2.h" - #include "spdy/core/spdy_header_block.h" - ---- http2/adapter/http2_util.cc -+++ http2/adapter/http2_util.cc -@@ -1,5 +1,7 @@ - #include "third_party/http2/adapter/http2_util.h" - -+#undef NO_ERROR -+ - namespace http2 { - namespace adapter { - namespace { - ---- http2/adapter/oghttp2_session.cc -+++ http2/adapter/oghttp2_session.cc -@@ -11,6 +11,8 @@ - #include "http2/adapter/oghttp2_util.h" - #include "spdy/core/spdy_protocol.h" - -+#undef NO_ERROR -+ - namespace http2 { - namespace adapter { - diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index b2ed497e3a18a..89485043ef4e4 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -838,12 +838,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "QUICHE", project_desc = "QUICHE (QUIC, HTTP/2, Etc) is Google‘s implementation of QUIC and related protocols", project_url = "https://github.com/google/quiche", - version = "4f552f349b8df000af24bc6cfa0b78fdc2467fef", - sha256 = "355c80803698d2a44363ed304d250059cc5d7712281481803717f8d779229bd8", + version = "81314ecbd8cfd3c8399fcd1c1e7ca557b41d18de", + sha256 = "61e28bf91daba19f65af53b19fbefd5876b3365835e7c0091ccf0c91dba72ba6", urls = ["https://github.com/google/quiche/archive/{version}.tar.gz"], strip_prefix = "quiche-{version}", use_category = ["dataplane_core"], - release_date = "2021-11-15", + release_date = "2021-11-17", cpe = "N/A", ), com_googlesource_googleurl = dict( diff --git a/source/common/http/http2/codec_impl.cc b/source/common/http/http2/codec_impl.cc index 2193059f02d31..1e19b3c752904 100644 --- a/source/common/http/http2/codec_impl.cc +++ b/source/common/http/http2/codec_impl.cc @@ -902,7 +902,7 @@ int ConnectionImpl::onData(int32_t stream_id, const uint8_t* data, size_t len) { void ConnectionImpl::goAway() { if (use_new_codec_wrapper_) { adapter_->SubmitGoAway(adapter_->GetHighestReceivedStreamId(), - http2::adapter::Http2ErrorCode::NO_ERROR, ""); + http2::adapter::Http2ErrorCode::HTTP2_NO_ERROR, ""); } else { int rc = nghttp2_submit_goaway(session_, NGHTTP2_FLAG_NONE, nghttp2_session_get_last_proc_stream_id(session_),