@fails-components/webtransport 0.0.1-rc.0 → 0.0.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish-packages.yml +0 -0
- package/CMakeLists.txt +2 -0
- package/package.json +1 -1
- package/readme.md +0 -0
- package/src/http3serversession.h +1 -1
- package/src/webtransport.js +4 -2
- package/third_party/boringssl/src/CMakeLists.txt +9 -12
- package/third_party/boringssl/src/crypto/CMakeLists.txt +2 -3
- package/third_party/boringssl/src/crypto/asn1/time_support.c +206 -206
- package/third_party/boringssl/src/crypto/bio/socket_helper.c +124 -122
- package/third_party/boringssl/src/crypto/evp/digestsign.c +268 -231
- package/third_party/boringssl/src/crypto/evp/p_ec.c +286 -286
- package/third_party/boringssl/src/crypto/fipsmodule/aes/key_wrap.c +246 -236
- package/third_party/boringssl/src/crypto/fipsmodule/aes/mode_wrappers.c +124 -122
- package/third_party/boringssl/src/crypto/fipsmodule/bcm.c +3 -0
- package/third_party/boringssl/src/crypto/fipsmodule/bn/bytes.c +246 -230
- package/third_party/boringssl/src/crypto/fipsmodule/bn/internal.h +734 -715
- package/third_party/boringssl/src/crypto/fipsmodule/bn/random.c +349 -341
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/cipher.c +670 -648
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c +1504 -1472
- package/third_party/boringssl/src/crypto/{cipher_extra → fipsmodule/cipher}/e_aesccm.c +435 -446
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cavp_3des_cmac_tests.txt +0 -0
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cavp_aes128_cmac_tests.txt +0 -0
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cavp_aes192_cmac_tests.txt +0 -0
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cavp_aes256_cmac_tests.txt +0 -0
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cmac.c +318 -278
- package/third_party/boringssl/src/crypto/{cmac → fipsmodule/cmac}/cmac_test.cc +268 -267
- package/third_party/boringssl/src/crypto/fipsmodule/dh/dh.c +5 -1
- package/third_party/boringssl/src/crypto/fipsmodule/ec/ec.c +11 -17
- package/third_party/boringssl/src/crypto/fipsmodule/ec/ec_key.c +15 -4
- package/third_party/boringssl/src/crypto/fipsmodule/ec/internal.h +2 -6
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p224-64.c +1164 -1180
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz.c +3 -3
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz_test.cc +2 -2
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p256.c +44 -33
- package/third_party/boringssl/src/crypto/fipsmodule/ec/scalar.c +169 -175
- package/third_party/boringssl/src/crypto/fipsmodule/ec/simple.c +352 -357
- package/third_party/boringssl/src/crypto/fipsmodule/ecdh/ecdh.c +4 -0
- package/third_party/boringssl/src/crypto/fipsmodule/ecdsa/ecdsa.c +14 -9
- package/third_party/boringssl/src/crypto/fipsmodule/hmac/hmac.c +256 -235
- package/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c +204 -202
- package/third_party/boringssl/src/crypto/fipsmodule/rsa/padding.c +702 -695
- package/third_party/boringssl/src/crypto/fipsmodule/rsa/rsa_impl.c +7 -2
- package/third_party/boringssl/src/crypto/fipsmodule/self_check/self_check.c +7 -0
- package/third_party/boringssl/src/crypto/fipsmodule/service_indicator/internal.h +89 -0
- package/third_party/boringssl/src/crypto/fipsmodule/service_indicator/service_indicator.c +333 -0
- package/third_party/boringssl/src/crypto/fipsmodule/service_indicator/service_indicator_test.cc +2410 -0
- package/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c +359 -357
- package/third_party/boringssl/src/crypto/fipsmodule/sha/sha256.c +325 -321
- package/third_party/boringssl/src/crypto/fipsmodule/sha/sha512.c +510 -508
- package/third_party/boringssl/src/crypto/fipsmodule/tls/kdf.c +177 -165
- package/third_party/boringssl/src/crypto/internal.h +13 -0
- package/third_party/boringssl/src/crypto/trust_token/trust_token_test.cc +884 -884
- package/third_party/boringssl/src/crypto/x509/internal.h +0 -2
- package/third_party/boringssl/src/crypto/x509/t_crl.c +148 -148
- package/third_party/boringssl/src/crypto/x509/t_req.c +249 -250
- package/third_party/boringssl/src/crypto/x509/t_x509.c +2 -3
- package/third_party/boringssl/src/crypto/x509/x509_req.c +262 -304
- package/third_party/boringssl/src/crypto/x509/x509_set.c +250 -240
- package/third_party/boringssl/src/crypto/x509/x509_test.cc +466 -4
- package/third_party/boringssl/src/crypto/x509/x509cset.c +292 -279
- package/third_party/boringssl/src/crypto/x509/x509rset.c +89 -86
- package/third_party/boringssl/src/crypto/x509/x_crl.c +37 -125
- package/third_party/boringssl/src/crypto/x509/x_req.c +114 -109
- package/third_party/boringssl/src/crypto/x509/x_x509.c +394 -394
- package/third_party/boringssl/src/crypto/x509v3/v3_akey.c +11 -16
- package/third_party/boringssl/src/crypto/x509v3/v3_alt.c +644 -642
- package/third_party/boringssl/src/crypto/x509v3/v3_bcons.c +130 -133
- package/third_party/boringssl/src/crypto/x509v3/v3_bitst.c +149 -144
- package/third_party/boringssl/src/crypto/x509v3/v3_cpols.c +496 -500
- package/third_party/boringssl/src/crypto/x509v3/v3_enum.c +105 -106
- package/third_party/boringssl/src/crypto/x509v3/v3_ia5.c +126 -121
- package/third_party/boringssl/src/crypto/x509v3/v3_info.c +206 -218
- package/third_party/boringssl/src/crypto/x509v3/v3_int.c +97 -91
- package/third_party/boringssl/src/crypto/x509v3/v3_pci.c +290 -289
- package/third_party/boringssl/src/crypto/x509v3/v3_skey.c +161 -156
- package/third_party/boringssl/src/crypto/x509v3/v3_utl.c +5 -3
- package/third_party/boringssl/src/include/openssl/aead.h +480 -480
- package/third_party/boringssl/src/include/openssl/asn1.h +2 -0
- package/third_party/boringssl/src/include/openssl/base.h +1 -1
- package/third_party/boringssl/src/include/openssl/service_indicator.h +96 -0
- package/third_party/boringssl/src/include/openssl/ssl.h +7 -0
- package/third_party/boringssl/src/include/openssl/x509.h +11 -33
- package/third_party/boringssl/src/include/openssl/x509v3.h +990 -1018
- package/third_party/boringssl/src/sources.cmake +4 -4
- package/third_party/boringssl/src/ssl/internal.h +10 -0
- package/third_party/boringssl/src/ssl/ssl_lib.cc +3081 -3072
- package/third_party/boringssl/src/ssl/ssl_test.cc +46 -0
- package/third_party/boringssl/src/ssl/tls13_server.cc +4 -6
- package/third_party/boringssl/src/util/bot/DEPS +14 -27
- package/third_party/boringssl/src/util/bot/UPDATING +3 -9
- package/third_party/boringssl/src/util/bot/update_clang.py +172 -172
- package/third_party/boringssl/src/util/bot/vs_toolchain.py +3 -3
- package/third_party/quiche/.bazelrc +8 -0
- package/third_party/quiche/BUILD.bazel +7 -0
- package/third_party/quiche/WHITESPACE +3 -1
- package/third_party/quiche/WORKSPACE.bazel +87 -0
- package/third_party/quiche/build/BUILD.bazel +7 -0
- package/third_party/quiche/build/source_list.bzl +1511 -0
- package/third_party/quiche/build/source_list.gni +1511 -0
- package/third_party/quiche/build/source_list.json +1511 -0
- package/third_party/quiche/build/test.bzl +26 -0
- package/third_party/quiche/build/zlib.BUILD +25 -0
- package/third_party/quiche/quiche/BUILD.bazel +270 -0
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_enums.cc +3 -3
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_enums.h +7 -7
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_frame.cc +39 -18
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_frame.h +11 -10
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_frame_test.cc +67 -63
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_headers.cc +13 -12
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_headers.h +16 -8
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_headers_test.cc +9 -9
- package/third_party/quiche/quiche/{common/balsa → balsa}/balsa_visitor_interface.h +4 -4
- package/third_party/quiche/quiche/{common/balsa → balsa}/framer_interface.h +3 -3
- package/third_party/quiche/quiche/{common/balsa → balsa}/header_api.h +3 -3
- package/third_party/quiche/quiche/{common/balsa → balsa}/header_properties.cc +1 -1
- package/third_party/quiche/quiche/{common/balsa → balsa}/header_properties.h +3 -3
- package/third_party/quiche/quiche/{common/balsa → balsa}/header_properties_test.cc +1 -1
- package/third_party/quiche/quiche/{common/balsa → balsa}/http_validation_policy.cc +1 -1
- package/third_party/quiche/quiche/{common/balsa → balsa}/http_validation_policy.h +3 -3
- package/third_party/quiche/quiche/{common/balsa → balsa}/noop_balsa_visitor.h +4 -4
- package/third_party/quiche/quiche/{common/balsa → balsa}/simple_buffer.cc +22 -29
- package/third_party/quiche/quiche/{common/balsa → balsa}/simple_buffer.h +18 -16
- package/third_party/quiche/quiche/{common/balsa → balsa}/simple_buffer_test.cc +79 -32
- package/third_party/quiche/quiche/{common/balsa → balsa}/standard_header_map.cc +1 -1
- package/third_party/quiche/quiche/{common/balsa → balsa}/standard_header_map.h +3 -3
- package/third_party/quiche/quiche/common/platform/api/quiche_command_line_flags.h +6 -1
- package/third_party/quiche/quiche/common/platform/api/quiche_flags.h +8 -0
- package/third_party/quiche/quiche/common/platform/api/quiche_logging.h +0 -3
- package/third_party/quiche/quiche/common/platform/api/quiche_lower_case_string_test.cc +29 -0
- package/third_party/quiche/quiche/common/platform/api/quiche_test.h +5 -7
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quic_flags_impl.h +1 -1
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_bug_tracker_impl.h +3 -2
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_command_line_flags_impl.cc +41 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_command_line_flags_impl.h +33 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_expect_bug_impl.h +15 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h +84 -50
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_lower_case_string_impl.h +25 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.cc +1 -1
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.cc +25 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.h +56 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_test_output_impl.h +27 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_thread_impl.h +26 -0
- package/third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_url_utils_impl.cc +1 -0
- package/third_party/quiche/quiche/common/quiche_buffer_allocator_test.cc +1 -1
- package/third_party/quiche/quiche/common/quiche_mem_slice_storage.h +2 -3
- package/third_party/quiche/quiche/common/structured_headers.cc +14 -12
- package/third_party/quiche/quiche/http2/adapter/event_forwarder.cc +7 -5
- package/third_party/quiche/quiche/http2/adapter/event_forwarder.h +4 -2
- package/third_party/quiche/quiche/http2/adapter/event_forwarder_test.cc +14 -9
- package/third_party/quiche/quiche/http2/adapter/header_validator.cc +43 -19
- package/third_party/quiche/quiche/http2/adapter/header_validator.h +11 -40
- package/third_party/quiche/quiche/http2/adapter/header_validator_base.h +69 -0
- package/third_party/quiche/quiche/http2/adapter/header_validator_test.cc +73 -1
- package/third_party/quiche/quiche/http2/adapter/nghttp2_adapter_test.cc +66 -0
- package/third_party/quiche/quiche/http2/adapter/nghttp2_session_test.cc +8 -5
- package/third_party/quiche/quiche/http2/adapter/nghttp2_test.cc +1 -1
- package/third_party/quiche/quiche/http2/adapter/noop_header_validator.cc +22 -0
- package/third_party/quiche/quiche/http2/adapter/noop_header_validator.h +25 -0
- package/third_party/quiche/quiche/http2/adapter/noop_header_validator_test.cc +523 -0
- package/third_party/quiche/quiche/http2/adapter/oghttp2_adapter_test.cc +186 -5
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.cc +37 -43
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.h +22 -23
- package/third_party/quiche/quiche/http2/adapter/test_utils.cc +1 -1
- package/third_party/quiche/quiche/http2/adapter/window_manager_test.cc +11 -5
- package/third_party/quiche/quiche/http2/core/http2_trace_logging.cc +13 -11
- package/third_party/quiche/quiche/http2/core/http2_trace_logging.h +5 -4
- package/third_party/quiche/quiche/http2/core/priority_write_scheduler.h +42 -36
- package/third_party/quiche/quiche/http2/core/priority_write_scheduler_test.cc +2 -2
- package/third_party/quiche/quiche/http2/decoder/decode_buffer_test.cc +9 -9
- package/third_party/quiche/quiche/http2/decoder/decode_http2_structures_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/http2_frame_decoder_test.cc +14 -14
- package/third_party/quiche/quiche/http2/decoder/http2_structure_decoder_test.cc +17 -17
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc +2 -2
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_block_decoder_test.cc +2 -2
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_decoder_state_test.cc +8 -8
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc +4 -3
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_decoder_tables_test.cc +17 -17
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_decoder_test.cc +25 -25
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_entry_decoder_test.cc +2 -2
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_entry_type_decoder_test.cc +7 -6
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_string_decoder_test.cc +6 -6
- package/third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc +1 -1
- package/third_party/quiche/quiche/http2/hpack/huffman/hpack_huffman_decoder_test.cc +2 -2
- package/third_party/quiche/quiche/http2/hpack/huffman/hpack_huffman_encoder_test.cc +1 -1
- package/third_party/quiche/quiche/http2/hpack/huffman/hpack_huffman_transcoder_test.cc +5 -5
- package/third_party/quiche/quiche/http2/hpack/varint/hpack_varint_decoder_test.cc +4 -4
- package/third_party/quiche/quiche/http2/hpack/varint/hpack_varint_round_trip_test.cc +1 -1
- package/third_party/quiche/quiche/http2/http2_constants_test.cc +1 -1
- package/third_party/quiche/quiche/http2/http2_structures_test.cc +23 -22
- package/third_party/quiche/quiche/http2/test_tools/frame_decoder_state_test_util.cc +1 -1
- package/third_party/quiche/quiche/http2/test_tools/frame_decoder_state_test_util.h +1 -1
- package/third_party/quiche/quiche/http2/test_tools/frame_parts.cc +38 -38
- package/third_party/quiche/quiche/http2/test_tools/hpack_block_collector.cc +15 -15
- package/third_party/quiche/quiche/http2/test_tools/hpack_entry_collector.cc +24 -22
- package/third_party/quiche/quiche/http2/test_tools/hpack_string_collector.cc +5 -5
- package/third_party/quiche/quiche/http2/test_tools/http2_frame_builder_test.cc +70 -89
- package/third_party/quiche/quiche/http2/test_tools/payload_decoder_base_test_util.cc +1 -1
- package/third_party/quiche/quiche/http2/test_tools/payload_decoder_base_test_util.h +29 -26
- package/third_party/quiche/quiche/http2/test_tools/{random_decoder_test.cc → random_decoder_test_base.cc} +13 -10
- package/third_party/quiche/quiche/http2/test_tools/{random_decoder_test.h → random_decoder_test_base.h} +15 -17
- package/third_party/quiche/quiche/http2/test_tools/{random_decoder_test_test.cc → random_decoder_test_base_test.cc} +1 -1
- package/third_party/quiche/quiche/http2/test_tools/verify_macros.h +32 -0
- package/third_party/quiche/quiche/quic/core/congestion_control/bbr2_sender.cc +2 -1
- package/third_party/quiche/quiche/quic/core/congestion_control/bbr2_simulator_test.cc +3 -2
- package/third_party/quiche/quiche/quic/core/congestion_control/bbr_sender_test.cc +3 -2
- package/third_party/quiche/quiche/quic/core/congestion_control/rtt_stats.cc +3 -2
- package/third_party/quiche/quiche/quic/core/congestion_control/rtt_stats.h +2 -1
- package/third_party/quiche/quiche/quic/core/congestion_control/rtt_stats_test.cc +2 -13
- package/third_party/quiche/quiche/quic/core/crypto/certificate_view.cc +15 -0
- package/third_party/quiche/quiche/quic/core/crypto/certificate_view.h +7 -0
- package/third_party/quiche/quiche/quic/core/crypto/certificate_view_test.cc +16 -0
- package/third_party/quiche/quiche/quic/core/crypto/crypto_protocol.h +1 -0
- package/third_party/quiche/quiche/quic/core/crypto/proof_source.h +2 -2
- package/third_party/quiche/quiche/quic/core/crypto/proof_source_x509.cc +3 -5
- package/third_party/quiche/quiche/quic/core/crypto/proof_source_x509.h +1 -2
- package/third_party/quiche/quiche/quic/core/crypto/quic_crypto_server_config.cc +1 -1
- package/third_party/quiche/quiche/quic/core/crypto/quic_crypto_server_config.h +3 -3
- package/third_party/quiche/quiche/quic/core/frames/quic_blocked_frame.cc +2 -8
- package/third_party/quiche/quiche/quic/core/frames/quic_blocked_frame.h +0 -1
- package/third_party/quiche/quiche/quic/core/frames/quic_crypto_frame.h +2 -0
- package/third_party/quiche/quiche/quic/core/frames/quic_frames_test.cc +2 -1
- package/third_party/quiche/quiche/quic/core/http/capsule.cc +2 -22
- package/third_party/quiche/quiche/quic/core/http/capsule.h +0 -2
- package/third_party/quiche/quiche/quic/core/http/capsule_test.cc +1 -2
- package/third_party/quiche/quiche/quic/core/http/end_to_end_test.cc +148 -57
- package/third_party/quiche/quiche/quic/core/http/http_constants.cc +1 -1
- package/third_party/quiche/quiche/quic/core/http/http_constants.h +2 -2
- package/third_party/quiche/quiche/quic/core/http/quic_header_list_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/http/quic_headers_stream_test.cc +18 -14
- package/third_party/quiche/quiche/quic/core/http/quic_send_control_stream.h +2 -1
- package/third_party/quiche/quiche/quic/core/http/quic_send_control_stream_test.cc +3 -7
- package/third_party/quiche/quiche/quic/core/http/quic_server_session_base.h +4 -0
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_session.cc +47 -65
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_session.h +5 -17
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_session_test.cc +63 -54
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.cc +34 -91
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.h +1 -9
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream_test.cc +27 -134
- package/third_party/quiche/quiche/quic/core/http/spdy_utils.cc +0 -41
- package/third_party/quiche/quiche/quic/core/http/spdy_utils.h +0 -9
- package/third_party/quiche/quiche/quic/core/http/spdy_utils_test.cc +0 -32
- package/third_party/quiche/quiche/quic/core/http/web_transport_http3.cc +0 -1
- package/third_party/quiche/quiche/quic/core/packet_number_indexed_queue_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/qpack/qpack_header_table.cc +2 -1
- package/third_party/quiche/quiche/quic/core/qpack/qpack_send_stream.h +2 -1
- package/third_party/quiche/quiche/quic/core/quic_arena_scoped_ptr_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_connection.cc +68 -46
- package/third_party/quiche/quiche/quic/core/quic_connection.h +7 -6
- package/third_party/quiche/quiche/quic/core/quic_connection_context_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_connection_id_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_connection_test.cc +45 -132
- package/third_party/quiche/quiche/quic/core/quic_constants.h +0 -7
- package/third_party/quiche/quiche/quic/core/quic_control_frame_manager.cc +11 -3
- package/third_party/quiche/quiche/quic/core/quic_control_frame_manager.h +1 -1
- package/third_party/quiche/quiche/quic/core/quic_control_frame_manager_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_crypto_client_handshaker.cc +13 -1
- package/third_party/quiche/quiche/quic/core/quic_crypto_client_handshaker.h +3 -0
- package/third_party/quiche/quiche/quic/core/quic_crypto_client_handshaker_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_crypto_client_stream.cc +6 -0
- package/third_party/quiche/quiche/quic/core/quic_crypto_client_stream.h +8 -0
- package/third_party/quiche/quiche/quic/core/quic_crypto_server_stream.cc +26 -13
- package/third_party/quiche/quiche/quic/core/quic_crypto_server_stream.h +5 -2
- package/third_party/quiche/quiche/quic/core/quic_crypto_stream.cc +55 -47
- package/third_party/quiche/quiche/quic/core/quic_crypto_stream.h +15 -10
- package/third_party/quiche/quiche/quic/core/quic_crypto_stream_test.cc +34 -5
- package/third_party/quiche/quiche/quic/core/quic_dispatcher.cc +20 -11
- package/third_party/quiche/quiche/quic/core/quic_dispatcher_test.cc +37 -13
- package/third_party/quiche/quiche/quic/core/quic_flags_list.h +6 -10
- package/third_party/quiche/quiche/quic/core/quic_flow_controller.cc +3 -3
- package/third_party/quiche/quiche/quic/core/quic_flow_controller.h +2 -2
- package/third_party/quiche/quiche/quic/core/quic_flow_controller_test.cc +15 -10
- package/third_party/quiche/quiche/quic/core/quic_framer.cc +1 -1
- package/third_party/quiche/quiche/quic/core/quic_one_block_arena.h +3 -2
- package/third_party/quiche/quiche/quic/core/quic_one_block_arena_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_packet_creator.cc +3 -11
- package/third_party/quiche/quiche/quic/core/quic_packet_creator.h +0 -8
- package/third_party/quiche/quiche/quic/core/quic_ping_manager.cc +14 -14
- package/third_party/quiche/quiche/quic/core/quic_ping_manager_test.cc +48 -0
- package/third_party/quiche/quiche/quic/core/quic_received_packet_manager.cc +3 -18
- package/third_party/quiche/quiche/quic/core/quic_received_packet_manager_test.cc +4 -14
- package/third_party/quiche/quiche/quic/core/quic_server_id_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_session.cc +4 -4
- package/third_party/quiche/quiche/quic/core/quic_session.h +1 -1
- package/third_party/quiche/quiche/quic/core/quic_session_test.cc +21 -1
- package/third_party/quiche/quiche/quic/core/quic_stream.cc +4 -7
- package/third_party/quiche/quiche/quic/core/quic_stream_test.cc +2 -4
- package/third_party/quiche/quiche/quic/core/quic_trace_visitor_test.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_types.h +3 -8
- package/third_party/quiche/quiche/quic/core/quic_udp_socket_posix.cc +5 -4
- package/third_party/quiche/quiche/quic/core/quic_unacked_packet_map_test.cc +1 -1
- package/third_party/quiche/quiche/quic/core/quic_utils.cc +1 -1
- package/third_party/quiche/quiche/quic/core/quic_utils.h +2 -2
- package/third_party/quiche/quiche/quic/core/quic_versions_test.cc +0 -1
- package/third_party/quiche/quiche/quic/core/tls_client_handshaker.cc +13 -0
- package/third_party/quiche/quiche/quic/core/tls_client_handshaker.h +2 -0
- package/third_party/quiche/quiche/quic/core/tls_server_handshaker.cc +17 -3
- package/third_party/quiche/quiche/quic/core/tls_server_handshaker.h +3 -1
- package/third_party/quiche/quiche/quic/core/uber_received_packet_manager_test.cc +18 -10
- package/third_party/quiche/quiche/quic/masque/masque_client_bin.cc +6 -4
- package/third_party/quiche/quiche/quic/masque/masque_client_session.cc +23 -7
- package/third_party/quiche/quiche/quic/masque/masque_client_session.h +1 -1
- package/third_party/quiche/quiche/quic/masque/masque_server_backend.cc +13 -0
- package/third_party/quiche/quiche/quic/masque/masque_server_backend.h +2 -0
- package/third_party/quiche/quiche/quic/masque/masque_server_bin.cc +5 -4
- package/third_party/quiche/quiche/quic/masque/masque_server_session.cc +30 -40
- package/third_party/quiche/quiche/quic/masque/masque_server_session.h +1 -1
- package/third_party/quiche/quiche/quic/platform/api/quic_export.h +4 -4
- package/third_party/quiche/quiche/quic/platform/api/quic_flags.h +0 -1
- package/third_party/quiche/quiche/quic/platform/api/quic_logging.h +0 -6
- package/third_party/quiche/quiche/quic/platform/api/quic_test.h +6 -5
- package/third_party/quiche/quiche/quic/qbone/bonnet/icmp_reachable_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/bonnet/mock_qbone_tunnel.h +2 -0
- package/third_party/quiche/quiche/quic/qbone/bonnet/qbone_tunnel_interface.h +2 -0
- package/third_party/quiche/quiche/quic/qbone/bonnet/tun_device_controller_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/bonnet/tun_device_packet_exchanger_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/bonnet/tun_device_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/platform/netlink_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/platform/tcp_packet.cc +5 -4
- package/third_party/quiche/quiche/quic/qbone/qbone_client_session.cc +4 -2
- package/third_party/quiche/quiche/quic/qbone/qbone_packet_processor.cc +2 -1
- package/third_party/quiche/quiche/quic/qbone/qbone_packet_processor_test.cc +2 -2
- package/third_party/quiche/quiche/quic/qbone/qbone_server_session.cc +4 -2
- package/third_party/quiche/quiche/quic/qbone/qbone_session_base.cc +3 -2
- package/third_party/quiche/quiche/quic/qbone/qbone_stream.cc +4 -4
- package/third_party/quiche/quiche/quic/test_tools/quic_connection_peer.cc +1 -1
- package/third_party/quiche/quiche/quic/test_tools/quic_http_response_cache_data/test.example.com/index.html +63 -0
- package/third_party/quiche/quiche/quic/test_tools/quic_http_response_cache_data/test.example.com/map.html +65 -0
- package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.cc +4 -3
- package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.h +18 -1
- package/third_party/quiche/quiche/quic/test_tools/simulator/quic_endpoint_test.cc +1 -1
- package/third_party/quiche/quiche/quic/test_tools/simulator/simulator_test.cc +1 -1
- package/third_party/quiche/quiche/quic/test_tools/test_ticket_crypter.cc +1 -1
- package/third_party/quiche/quiche/quic/test_tools/test_ticket_crypter.h +2 -2
- package/third_party/quiche/quiche/quic/{core/crypto → tools}/crypto_message_printer_bin.cc +0 -0
- package/third_party/quiche/quiche/quic/{core/qpack → tools}/qpack_offline_decoder_bin.cc +0 -0
- package/third_party/quiche/quiche/quic/tools/quic_client_interop_test_bin.cc +4 -3
- package/third_party/quiche/quiche/quic/tools/quic_memory_cache_backend_test.cc +3 -31
- package/third_party/quiche/quiche/quic/tools/quic_packet_printer_bin.cc +2 -2
- package/third_party/quiche/quiche/quic/tools/quic_simple_server_session.h +1 -1
- package/third_party/quiche/quiche/quic/tools/quic_simple_server_session_test.cc +1 -1
- package/third_party/quiche/quiche/quic/tools/quic_toy_client.cc +52 -38
- package/third_party/quiche/quiche/quic/tools/quic_toy_server.cc +10 -7
- package/third_party/quiche/quiche/quic/tools/simple_ticket_crypter.cc +1 -1
- package/third_party/quiche/quiche/quic/tools/simple_ticket_crypter.h +1 -1
- package/third_party/quiche/quiche/quic/tools/web_transport_test_visitors.h +3 -2
- package/third_party/quiche/quiche/spdy/core/array_output_buffer.h +1 -1
- package/third_party/quiche/quiche/spdy/core/hpack/hpack_decoder_adapter_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/hpack/hpack_encoder_test.cc +2 -1
- package/third_party/quiche/quiche/spdy/core/hpack/hpack_header_table_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/hpack/hpack_round_trip_test.cc +2 -1
- package/third_party/quiche/quiche/spdy/core/hpack/hpack_static_table_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.cc +8 -6
- package/third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.h +17 -6
- package/third_party/quiche/quiche/spdy/core/metadata_extension.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/metadata_extension_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/spdy_framer_test.cc +21 -17
- package/third_party/quiche/quiche/spdy/core/spdy_intrusive_list_test.cc +3 -3
- package/third_party/quiche/quiche/spdy/core/spdy_no_op_visitor.h +6 -4
- package/third_party/quiche/quiche/spdy/core/spdy_pinnable_buffer_piece_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/spdy_prefixed_buffer_reader_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/core/spdy_protocol_test.cc +1 -1
- package/third_party/quiche/quiche/spdy/test_tools/mock_spdy_framer_visitor.h +5 -4
- package/third_party/boringssl/src/util/bot/cmake-win32.zip.sha1 +0 -1
- package/third_party/quiche/quiche/common/platform/api/quiche_mock_log.h +0 -18
- package/third_party/quiche/quiche/common/platform/api/quiche_test_helpers.h +0 -8
- package/third_party/quiche/quiche/quic/platform/api/quic_mock_log.h +0 -19
- package/third_party/quiche/quiche/quic/tools/quic_transport_simple_server_dispatcher.cc +0 -51
- package/third_party/quiche/quiche/quic/tools/quic_transport_simple_server_dispatcher.h +0 -41
- package/third_party/quiche/quiche/quic/tools/quic_transport_simple_server_session.cc +0 -168
- package/third_party/quiche/quiche/quic/tools/quic_transport_simple_server_session.h +0 -78
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
#include "quiche/http2/adapter/oghttp2_util.h"
|
|
10
10
|
#include "quiche/http2/adapter/test_frame_sequence.h"
|
|
11
11
|
#include "quiche/http2/adapter/test_utils.h"
|
|
12
|
+
#include "quiche/common/platform/api/quiche_expect_bug.h"
|
|
12
13
|
#include "quiche/common/platform/api/quiche_test.h"
|
|
13
|
-
#include "quiche/common/platform/api/quiche_test_helpers.h"
|
|
14
14
|
|
|
15
15
|
namespace http2 {
|
|
16
16
|
namespace adapter {
|
|
@@ -4531,6 +4531,63 @@ TEST(OgHttp2AdapterTest, IncompleteRequestWithServerResponseRstStreamEnabled) {
|
|
|
4531
4531
|
EXPECT_FALSE(adapter->want_write());
|
|
4532
4532
|
}
|
|
4533
4533
|
|
|
4534
|
+
TEST(OgHttp2AdapterTest, ServerHandlesMultipleContentLength) {
|
|
4535
|
+
DataSavingVisitor visitor;
|
|
4536
|
+
OgHttp2Adapter::Options options;
|
|
4537
|
+
options.perspective = Perspective::kServer;
|
|
4538
|
+
auto adapter = OgHttp2Adapter::Create(visitor, options);
|
|
4539
|
+
EXPECT_FALSE(adapter->want_write());
|
|
4540
|
+
|
|
4541
|
+
const std::string frames = TestFrameSequence()
|
|
4542
|
+
.ClientPreface()
|
|
4543
|
+
.Headers(1,
|
|
4544
|
+
{{":method", "POST"},
|
|
4545
|
+
{":scheme", "https"},
|
|
4546
|
+
{":authority", "example.com"},
|
|
4547
|
+
{":path", "/1"},
|
|
4548
|
+
{"content-length", "7"},
|
|
4549
|
+
{"content-length", "7"}},
|
|
4550
|
+
/*fin=*/false)
|
|
4551
|
+
.Headers(3,
|
|
4552
|
+
{{":method", "POST"},
|
|
4553
|
+
{":scheme", "https"},
|
|
4554
|
+
{":authority", "example.com"},
|
|
4555
|
+
{":path", "/3"},
|
|
4556
|
+
{"content-length", "11"},
|
|
4557
|
+
{"content-length", "13"}},
|
|
4558
|
+
/*fin=*/false)
|
|
4559
|
+
.Serialize();
|
|
4560
|
+
testing::InSequence s;
|
|
4561
|
+
|
|
4562
|
+
// Client preface (empty SETTINGS)
|
|
4563
|
+
EXPECT_CALL(visitor, OnFrameHeader(0, 0, SETTINGS, 0));
|
|
4564
|
+
EXPECT_CALL(visitor, OnSettingsStart());
|
|
4565
|
+
EXPECT_CALL(visitor, OnSettingsEnd());
|
|
4566
|
+
// Stream 1
|
|
4567
|
+
EXPECT_CALL(visitor, OnFrameHeader(1, _, HEADERS, 4));
|
|
4568
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(1));
|
|
4569
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":method", "POST"));
|
|
4570
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":scheme", "https"));
|
|
4571
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":authority", "example.com"));
|
|
4572
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":path", "/1"));
|
|
4573
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, "content-length", "7"));
|
|
4574
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(1));
|
|
4575
|
+
// Stream 3
|
|
4576
|
+
EXPECT_CALL(visitor, OnFrameHeader(3, _, HEADERS, 4));
|
|
4577
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(3));
|
|
4578
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":method", "POST"));
|
|
4579
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":scheme", "https"));
|
|
4580
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":authority", "example.com"));
|
|
4581
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":path", "/3"));
|
|
4582
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, "content-length", "11"));
|
|
4583
|
+
EXPECT_CALL(
|
|
4584
|
+
visitor,
|
|
4585
|
+
OnInvalidFrame(3, Http2VisitorInterface::InvalidFrameError::kHttpHeader));
|
|
4586
|
+
|
|
4587
|
+
const int64_t result = adapter->ProcessBytes(frames);
|
|
4588
|
+
EXPECT_EQ(frames.size(), static_cast<size_t>(result));
|
|
4589
|
+
}
|
|
4590
|
+
|
|
4534
4591
|
TEST(OgHttp2AdapterTest, ServerSendsInvalidTrailers) {
|
|
4535
4592
|
DataSavingVisitor visitor;
|
|
4536
4593
|
OgHttp2Adapter::Options options;
|
|
@@ -4683,9 +4740,8 @@ TEST(OgHttp2AdapterTest, ServerQueuesMetadataThenTrailers) {
|
|
|
4683
4740
|
ASSERT_EQ(trailer_result, 0);
|
|
4684
4741
|
EXPECT_TRUE(adapter->want_write());
|
|
4685
4742
|
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
// EXPECT_CALL(visitor, OnFrameSent(kMetadataFrameType, 1, _, 0x4, 0));
|
|
4743
|
+
EXPECT_CALL(visitor, OnBeforeFrameSent(kMetadataFrameType, 1, _, 0x4));
|
|
4744
|
+
EXPECT_CALL(visitor, OnFrameSent(kMetadataFrameType, 1, _, 0x4, 0));
|
|
4689
4745
|
|
|
4690
4746
|
EXPECT_CALL(visitor, OnBeforeFrameSent(HEADERS, 1, _, 0x5));
|
|
4691
4747
|
EXPECT_CALL(visitor, OnFrameSent(HEADERS, 1, _, 0x5, 0));
|
|
@@ -4694,7 +4750,9 @@ TEST(OgHttp2AdapterTest, ServerQueuesMetadataThenTrailers) {
|
|
|
4694
4750
|
|
|
4695
4751
|
send_result = adapter->Send();
|
|
4696
4752
|
EXPECT_EQ(0, send_result);
|
|
4697
|
-
EXPECT_THAT(visitor.data(),
|
|
4753
|
+
EXPECT_THAT(visitor.data(),
|
|
4754
|
+
EqualsFrames({static_cast<SpdyFrameType>(kMetadataFrameType),
|
|
4755
|
+
SpdyFrameType::HEADERS}));
|
|
4698
4756
|
}
|
|
4699
4757
|
|
|
4700
4758
|
TEST(OgHttp2AdapterTest, ServerHandlesDataWithPadding) {
|
|
@@ -7375,6 +7433,129 @@ TEST(OgHttp2AdapterTest, ServerUsesCustomWindowUpdateStrategy) {
|
|
|
7375
7433
|
SpdyFrameType::WINDOW_UPDATE}));
|
|
7376
7434
|
}
|
|
7377
7435
|
|
|
7436
|
+
// Verifies that NoopHeaderValidator allows several header combinations that
|
|
7437
|
+
// would otherwise be invalid.
|
|
7438
|
+
TEST(OgHttp2AdapterTest, NoopHeaderValidatorTest) {
|
|
7439
|
+
DataSavingVisitor visitor;
|
|
7440
|
+
OgHttp2Adapter::Options options;
|
|
7441
|
+
options.perspective = Perspective::kServer;
|
|
7442
|
+
options.validate_http_headers = false;
|
|
7443
|
+
auto adapter = OgHttp2Adapter::Create(visitor, options);
|
|
7444
|
+
|
|
7445
|
+
const std::string frames = TestFrameSequence()
|
|
7446
|
+
.ClientPreface()
|
|
7447
|
+
.Headers(1,
|
|
7448
|
+
{{":method", "POST"},
|
|
7449
|
+
{":scheme", "https"},
|
|
7450
|
+
{":authority", "example.com"},
|
|
7451
|
+
{":path", "/1"},
|
|
7452
|
+
{"content-length", "7"},
|
|
7453
|
+
{"content-length", "7"}},
|
|
7454
|
+
/*fin=*/false)
|
|
7455
|
+
.Headers(3,
|
|
7456
|
+
{{":method", "POST"},
|
|
7457
|
+
{":scheme", "https"},
|
|
7458
|
+
{":authority", "example.com"},
|
|
7459
|
+
{":path", "/3"},
|
|
7460
|
+
{"content-length", "11"},
|
|
7461
|
+
{"content-length", "13"}},
|
|
7462
|
+
/*fin=*/false)
|
|
7463
|
+
.Headers(5,
|
|
7464
|
+
{{":method", "POST"},
|
|
7465
|
+
{":scheme", "https"},
|
|
7466
|
+
{":authority", "foo.com"},
|
|
7467
|
+
{":path", "/"},
|
|
7468
|
+
{"host", "bar.com"}},
|
|
7469
|
+
/*fin=*/true)
|
|
7470
|
+
.Headers(7,
|
|
7471
|
+
{{":method", "POST"},
|
|
7472
|
+
{":scheme", "https"},
|
|
7473
|
+
{":authority", "example.com"},
|
|
7474
|
+
{":path", "/"},
|
|
7475
|
+
{"Accept", "uppercase, oh boy!"}},
|
|
7476
|
+
/*fin=*/false)
|
|
7477
|
+
.Headers(9,
|
|
7478
|
+
{{":method", "POST"},
|
|
7479
|
+
{":scheme", "https"},
|
|
7480
|
+
{":authority", "ex|ample.com"},
|
|
7481
|
+
{":path", "/"}},
|
|
7482
|
+
/*fin=*/false)
|
|
7483
|
+
.Headers(11,
|
|
7484
|
+
{{":method", "GET"},
|
|
7485
|
+
{":scheme", "https"},
|
|
7486
|
+
{":authority", "example.com"},
|
|
7487
|
+
{":path", "/"},
|
|
7488
|
+
{"content-length", "nan"}},
|
|
7489
|
+
/*fin=*/true)
|
|
7490
|
+
.Serialize();
|
|
7491
|
+
testing::InSequence s;
|
|
7492
|
+
|
|
7493
|
+
// Client preface (empty SETTINGS)
|
|
7494
|
+
EXPECT_CALL(visitor, OnFrameHeader(0, 0, SETTINGS, 0));
|
|
7495
|
+
EXPECT_CALL(visitor, OnSettingsStart());
|
|
7496
|
+
EXPECT_CALL(visitor, OnSettingsEnd());
|
|
7497
|
+
// Stream 1
|
|
7498
|
+
EXPECT_CALL(visitor, OnFrameHeader(1, _, HEADERS, 4));
|
|
7499
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(1));
|
|
7500
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":method", "POST"));
|
|
7501
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":scheme", "https"));
|
|
7502
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":authority", "example.com"));
|
|
7503
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, ":path", "/1"));
|
|
7504
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, "content-length", "7"));
|
|
7505
|
+
EXPECT_CALL(visitor, OnHeaderForStream(1, "content-length", "7"));
|
|
7506
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(1));
|
|
7507
|
+
// Stream 3
|
|
7508
|
+
EXPECT_CALL(visitor, OnFrameHeader(3, _, HEADERS, 4));
|
|
7509
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(3));
|
|
7510
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":method", "POST"));
|
|
7511
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":scheme", "https"));
|
|
7512
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":authority", "example.com"));
|
|
7513
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, ":path", "/3"));
|
|
7514
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, "content-length", "11"));
|
|
7515
|
+
EXPECT_CALL(visitor, OnHeaderForStream(3, "content-length", "13"));
|
|
7516
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(3));
|
|
7517
|
+
// Stream 5
|
|
7518
|
+
EXPECT_CALL(visitor, OnFrameHeader(5, _, HEADERS, 5));
|
|
7519
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(5));
|
|
7520
|
+
EXPECT_CALL(visitor, OnHeaderForStream(5, ":method", "POST"));
|
|
7521
|
+
EXPECT_CALL(visitor, OnHeaderForStream(5, ":scheme", "https"));
|
|
7522
|
+
EXPECT_CALL(visitor, OnHeaderForStream(5, ":authority", "foo.com"));
|
|
7523
|
+
EXPECT_CALL(visitor, OnHeaderForStream(5, ":path", "/"));
|
|
7524
|
+
EXPECT_CALL(visitor, OnHeaderForStream(5, "host", "bar.com"));
|
|
7525
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(5));
|
|
7526
|
+
EXPECT_CALL(visitor, OnEndStream(5));
|
|
7527
|
+
// Stream 7
|
|
7528
|
+
EXPECT_CALL(visitor, OnFrameHeader(7, _, HEADERS, 4));
|
|
7529
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(7));
|
|
7530
|
+
EXPECT_CALL(visitor, OnHeaderForStream(7, ":method", "POST"));
|
|
7531
|
+
EXPECT_CALL(visitor, OnHeaderForStream(7, ":scheme", "https"));
|
|
7532
|
+
EXPECT_CALL(visitor, OnHeaderForStream(7, ":authority", "example.com"));
|
|
7533
|
+
EXPECT_CALL(visitor, OnHeaderForStream(7, ":path", "/"));
|
|
7534
|
+
EXPECT_CALL(visitor, OnHeaderForStream(7, "Accept", "uppercase, oh boy!"));
|
|
7535
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(7));
|
|
7536
|
+
// Stream 9
|
|
7537
|
+
EXPECT_CALL(visitor, OnFrameHeader(9, _, HEADERS, 4));
|
|
7538
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(9));
|
|
7539
|
+
EXPECT_CALL(visitor, OnHeaderForStream(9, ":method", "POST"));
|
|
7540
|
+
EXPECT_CALL(visitor, OnHeaderForStream(9, ":scheme", "https"));
|
|
7541
|
+
EXPECT_CALL(visitor, OnHeaderForStream(9, ":authority", "ex|ample.com"));
|
|
7542
|
+
EXPECT_CALL(visitor, OnHeaderForStream(9, ":path", "/"));
|
|
7543
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(9));
|
|
7544
|
+
// Stream 11
|
|
7545
|
+
EXPECT_CALL(visitor, OnFrameHeader(11, _, HEADERS, 5));
|
|
7546
|
+
EXPECT_CALL(visitor, OnBeginHeadersForStream(11));
|
|
7547
|
+
EXPECT_CALL(visitor, OnHeaderForStream(11, ":method", "GET"));
|
|
7548
|
+
EXPECT_CALL(visitor, OnHeaderForStream(11, ":scheme", "https"));
|
|
7549
|
+
EXPECT_CALL(visitor, OnHeaderForStream(11, ":authority", "example.com"));
|
|
7550
|
+
EXPECT_CALL(visitor, OnHeaderForStream(11, ":path", "/"));
|
|
7551
|
+
EXPECT_CALL(visitor, OnHeaderForStream(11, "content-length", "nan"));
|
|
7552
|
+
EXPECT_CALL(visitor, OnEndHeadersForStream(11));
|
|
7553
|
+
EXPECT_CALL(visitor, OnEndStream(11));
|
|
7554
|
+
|
|
7555
|
+
const int64_t result = adapter->ProcessBytes(frames);
|
|
7556
|
+
EXPECT_EQ(frames.size(), static_cast<size_t>(result));
|
|
7557
|
+
}
|
|
7558
|
+
|
|
7378
7559
|
} // namespace
|
|
7379
7560
|
} // namespace test
|
|
7380
7561
|
} // namespace adapter
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include "quiche/http2/adapter/http2_protocol.h"
|
|
11
11
|
#include "quiche/http2/adapter/http2_util.h"
|
|
12
12
|
#include "quiche/http2/adapter/http2_visitor_interface.h"
|
|
13
|
+
#include "quiche/http2/adapter/noop_header_validator.h"
|
|
13
14
|
#include "quiche/http2/adapter/oghttp2_util.h"
|
|
14
15
|
#include "quiche/spdy/core/spdy_protocol.h"
|
|
15
16
|
|
|
@@ -216,6 +217,18 @@ bool IsNonAckSettings(const spdy::SpdyFrameIR& frame) {
|
|
|
216
217
|
|
|
217
218
|
} // namespace
|
|
218
219
|
|
|
220
|
+
OgHttp2Session::PassthroughHeadersHandler::PassthroughHeadersHandler(
|
|
221
|
+
OgHttp2Session& session, Http2VisitorInterface& visitor)
|
|
222
|
+
: session_(session), visitor_(visitor) {
|
|
223
|
+
if (session_.options_.validate_http_headers) {
|
|
224
|
+
QUICHE_VLOG(2) << "instantiating regular header validator";
|
|
225
|
+
validator_ = absl::make_unique<HeaderValidator>();
|
|
226
|
+
} else {
|
|
227
|
+
QUICHE_VLOG(2) << "instantiating noop header validator";
|
|
228
|
+
validator_ = absl::make_unique<NoopHeaderValidator>();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
219
232
|
void OgHttp2Session::PassthroughHeadersHandler::OnHeaderBlockStart() {
|
|
220
233
|
result_ = Http2VisitorInterface::HEADER_OK;
|
|
221
234
|
const bool status = visitor_.OnBeginHeadersForStream(stream_id_);
|
|
@@ -224,13 +237,14 @@ void OgHttp2Session::PassthroughHeadersHandler::OnHeaderBlockStart() {
|
|
|
224
237
|
<< "Visitor rejected header block, returning HEADER_CONNECTION_ERROR";
|
|
225
238
|
result_ = Http2VisitorInterface::HEADER_CONNECTION_ERROR;
|
|
226
239
|
}
|
|
227
|
-
validator_
|
|
240
|
+
validator_->StartHeaderBlock();
|
|
228
241
|
}
|
|
229
242
|
|
|
230
243
|
Http2VisitorInterface::OnHeaderResult InterpretHeaderStatus(
|
|
231
244
|
HeaderValidator::HeaderStatus status) {
|
|
232
245
|
switch (status) {
|
|
233
246
|
case HeaderValidator::HEADER_OK:
|
|
247
|
+
case HeaderValidator::HEADER_SKIP:
|
|
234
248
|
return Http2VisitorInterface::HEADER_OK;
|
|
235
249
|
case HeaderValidator::HEADER_FIELD_INVALID:
|
|
236
250
|
return Http2VisitorInterface::HEADER_FIELD_INVALID;
|
|
@@ -247,7 +261,10 @@ void OgHttp2Session::PassthroughHeadersHandler::OnHeader(
|
|
|
247
261
|
return;
|
|
248
262
|
}
|
|
249
263
|
const HeaderValidator::HeaderStatus validation_result =
|
|
250
|
-
validator_
|
|
264
|
+
validator_->ValidateSingleHeader(key, value);
|
|
265
|
+
if (validation_result == HeaderValidator::HEADER_SKIP) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
251
268
|
if (validation_result != HeaderValidator::HEADER_OK) {
|
|
252
269
|
QUICHE_VLOG(2) << "Header validation failed with result "
|
|
253
270
|
<< static_cast<int>(validation_result);
|
|
@@ -261,7 +278,7 @@ void OgHttp2Session::PassthroughHeadersHandler::OnHeaderBlockEnd(
|
|
|
261
278
|
size_t /* uncompressed_header_bytes */,
|
|
262
279
|
size_t /* compressed_header_bytes */) {
|
|
263
280
|
if (result_ == Http2VisitorInterface::HEADER_OK) {
|
|
264
|
-
if (!validator_
|
|
281
|
+
if (!validator_->FinishHeaderBlock(type_)) {
|
|
265
282
|
QUICHE_VLOG(1) << "FinishHeaderBlock returned false; returning "
|
|
266
283
|
"HEADER_HTTP_MESSAGING";
|
|
267
284
|
result_ = Http2VisitorInterface::HEADER_HTTP_MESSAGING;
|
|
@@ -322,6 +339,7 @@ struct OgHttp2Session::ProcessBytesResultVisitor {
|
|
|
322
339
|
|
|
323
340
|
OgHttp2Session::OgHttp2Session(Http2VisitorInterface& visitor, Options options)
|
|
324
341
|
: visitor_(visitor),
|
|
342
|
+
options_(options),
|
|
325
343
|
event_forwarder_([this]() { return !latched_error_; }, *this),
|
|
326
344
|
receive_logger_(
|
|
327
345
|
&event_forwarder_, TracePerspectiveAsString(options.perspective),
|
|
@@ -337,8 +355,7 @@ OgHttp2Session::OgHttp2Session(Http2VisitorInterface& visitor, Options options)
|
|
|
337
355
|
SendWindowUpdate(kConnectionStreamId, window_update_delta);
|
|
338
356
|
},
|
|
339
357
|
options.should_window_update_fn,
|
|
340
|
-
/*update_window_on_notify=*/false)
|
|
341
|
-
options_(options) {
|
|
358
|
+
/*update_window_on_notify=*/false) {
|
|
342
359
|
decoder_.set_visitor(&receive_logger_);
|
|
343
360
|
decoder_.set_extension_visitor(this);
|
|
344
361
|
if (options_.max_header_list_bytes) {
|
|
@@ -588,10 +605,6 @@ int OgHttp2Session::Send() {
|
|
|
588
605
|
// case, return early here to avoid sending other frames.
|
|
589
606
|
return InterpretSendResult(continue_writing);
|
|
590
607
|
}
|
|
591
|
-
while (continue_writing == SendResult::SEND_OK &&
|
|
592
|
-
!connection_metadata_.empty()) {
|
|
593
|
-
continue_writing = SendMetadata(0, connection_metadata_);
|
|
594
|
-
}
|
|
595
608
|
// Notify on new/pending streams closed due to GOAWAY receipt.
|
|
596
609
|
CloseGoAwayRejectedStreams();
|
|
597
610
|
// Wake streams for writes.
|
|
@@ -618,18 +631,12 @@ int OgHttp2Session::InterpretSendResult(SendResult result) {
|
|
|
618
631
|
}
|
|
619
632
|
|
|
620
633
|
bool OgHttp2Session::HasReadyStream() const {
|
|
621
|
-
return !
|
|
634
|
+
return !trailers_ready_.empty() ||
|
|
622
635
|
(write_scheduler_.HasReadyStreams() && connection_send_window_ > 0);
|
|
623
636
|
}
|
|
624
637
|
|
|
625
638
|
Http2StreamId OgHttp2Session::GetNextReadyStream() {
|
|
626
639
|
QUICHE_DCHECK(HasReadyStream());
|
|
627
|
-
if (!metadata_ready_.empty()) {
|
|
628
|
-
const Http2StreamId stream_id = *metadata_ready_.begin();
|
|
629
|
-
// WriteForStream() will re-mark the stream as ready, if necessary.
|
|
630
|
-
write_scheduler_.MarkStreamNotReady(stream_id);
|
|
631
|
-
return stream_id;
|
|
632
|
-
}
|
|
633
640
|
if (!trailers_ready_.empty()) {
|
|
634
641
|
const Http2StreamId stream_id = *trailers_ready_.begin();
|
|
635
642
|
// WriteForStream() will re-mark the stream as ready, if necessary.
|
|
@@ -786,14 +793,10 @@ OgHttp2Session::SendResult OgHttp2Session::WriteForStream(
|
|
|
786
793
|
// HEADERS.
|
|
787
794
|
state.outbound_body = nullptr;
|
|
788
795
|
state.trailers = nullptr;
|
|
789
|
-
state.outbound_metadata.clear();
|
|
790
796
|
return SendResult::SEND_OK;
|
|
791
797
|
}
|
|
792
|
-
SendResult connection_can_write = SendResult::SEND_OK;
|
|
793
|
-
if (!state.outbound_metadata.empty()) {
|
|
794
|
-
connection_can_write = SendMetadata(stream_id, state.outbound_metadata);
|
|
795
|
-
}
|
|
796
798
|
|
|
799
|
+
SendResult connection_can_write = SendResult::SEND_OK;
|
|
797
800
|
if (state.outbound_body == nullptr ||
|
|
798
801
|
(!options_.trailers_require_end_data && state.data_deferred)) {
|
|
799
802
|
// No data to send, but there might be trailers.
|
|
@@ -900,19 +903,18 @@ OgHttp2Session::SendResult OgHttp2Session::WriteForStream(
|
|
|
900
903
|
: SendResult::SEND_OK;
|
|
901
904
|
}
|
|
902
905
|
|
|
903
|
-
|
|
904
|
-
|
|
906
|
+
void OgHttp2Session::SerializeMetadata(Http2StreamId stream_id,
|
|
907
|
+
std::unique_ptr<MetadataSource> source) {
|
|
905
908
|
const uint32_t max_payload_size =
|
|
906
909
|
std::min(kMaxAllowedMetadataFrameSize, max_frame_payload_);
|
|
907
910
|
auto payload_buffer = absl::make_unique<uint8_t[]>(max_payload_size);
|
|
908
|
-
while (!sequence.empty()) {
|
|
909
|
-
MetadataSource& source = *sequence.front();
|
|
910
911
|
|
|
912
|
+
while (true) {
|
|
911
913
|
auto [written, end_metadata] =
|
|
912
|
-
source
|
|
914
|
+
source->Pack(payload_buffer.get(), max_payload_size);
|
|
913
915
|
if (written < 0) {
|
|
914
|
-
//
|
|
915
|
-
return
|
|
916
|
+
// Unable to pack any metadata.
|
|
917
|
+
return;
|
|
916
918
|
}
|
|
917
919
|
QUICHE_DCHECK_LE(static_cast<size_t>(written), max_payload_size);
|
|
918
920
|
auto payload = absl::string_view(
|
|
@@ -921,11 +923,9 @@ OgHttp2Session::SendResult OgHttp2Session::SendMetadata(
|
|
|
921
923
|
stream_id, kMetadataFrameType, end_metadata ? kMetadataEndFlag : 0u,
|
|
922
924
|
std::string(payload)));
|
|
923
925
|
if (end_metadata) {
|
|
924
|
-
|
|
925
|
-
metadata_ready_.erase(stream_id);
|
|
926
|
+
return;
|
|
926
927
|
}
|
|
927
928
|
}
|
|
928
|
-
return SendQueuedFrames();
|
|
929
929
|
}
|
|
930
930
|
|
|
931
931
|
int32_t OgHttp2Session::SubmitRequest(
|
|
@@ -1003,13 +1003,7 @@ int OgHttp2Session::SubmitTrailer(Http2StreamId stream_id,
|
|
|
1003
1003
|
|
|
1004
1004
|
void OgHttp2Session::SubmitMetadata(Http2StreamId stream_id,
|
|
1005
1005
|
std::unique_ptr<MetadataSource> source) {
|
|
1006
|
-
|
|
1007
|
-
connection_metadata_.push_back(std::move(source));
|
|
1008
|
-
} else {
|
|
1009
|
-
auto iter = CreateStream(stream_id);
|
|
1010
|
-
iter->second.outbound_metadata.push_back(std::move(source));
|
|
1011
|
-
metadata_ready_.insert(stream_id);
|
|
1012
|
-
}
|
|
1006
|
+
SerializeMetadata(stream_id, std::move(source));
|
|
1013
1007
|
}
|
|
1014
1008
|
|
|
1015
1009
|
void OgHttp2Session::SubmitSettings(absl::Span<const Http2Setting> settings) {
|
|
@@ -1344,7 +1338,8 @@ bool OgHttp2Session::OnGoAwayFrameData(const char* /*goaway_data*/, size_t
|
|
|
1344
1338
|
}
|
|
1345
1339
|
|
|
1346
1340
|
void OgHttp2Session::OnHeaders(spdy::SpdyStreamId stream_id,
|
|
1347
|
-
|
|
1341
|
+
size_t /*payload_length*/, bool /*has_priority*/,
|
|
1342
|
+
int /*weight*/,
|
|
1348
1343
|
spdy::SpdyStreamId /*parent_stream_id*/,
|
|
1349
1344
|
bool /*exclusive*/, bool fin, bool /*end*/) {
|
|
1350
1345
|
if (stream_id % 2 == 0) {
|
|
@@ -1440,8 +1435,8 @@ void OgHttp2Session::OnPushPromise(spdy::SpdyStreamId /*stream_id*/,
|
|
|
1440
1435
|
ConnectionError::kInvalidPushPromise);
|
|
1441
1436
|
}
|
|
1442
1437
|
|
|
1443
|
-
void OgHttp2Session::OnContinuation(spdy::SpdyStreamId /*stream_id*/,
|
|
1444
|
-
/*end*/) {}
|
|
1438
|
+
void OgHttp2Session::OnContinuation(spdy::SpdyStreamId /*stream_id*/,
|
|
1439
|
+
size_t /*payload_length*/, bool /*end*/) {}
|
|
1445
1440
|
|
|
1446
1441
|
void OgHttp2Session::OnAltSvc(spdy::SpdyStreamId /*stream_id*/,
|
|
1447
1442
|
absl::string_view /*origin*/,
|
|
@@ -1604,7 +1599,7 @@ void OgHttp2Session::HandleOutboundSettings(
|
|
|
1604
1599
|
if (value == 1u && IsServerSession()) {
|
|
1605
1600
|
// Allow extended CONNECT semantics even before SETTINGS are acked, to
|
|
1606
1601
|
// make things easier for clients.
|
|
1607
|
-
headers_handler_.
|
|
1602
|
+
headers_handler_.SetAllowExtendedConnect();
|
|
1608
1603
|
}
|
|
1609
1604
|
break;
|
|
1610
1605
|
case HEADER_TABLE_SIZE:
|
|
@@ -1754,7 +1749,6 @@ void OgHttp2Session::CloseStream(Http2StreamId stream_id,
|
|
|
1754
1749
|
}
|
|
1755
1750
|
stream_map_.erase(stream_id);
|
|
1756
1751
|
trailers_ready_.erase(stream_id);
|
|
1757
|
-
metadata_ready_.erase(stream_id);
|
|
1758
1752
|
streams_reset_.erase(stream_id);
|
|
1759
1753
|
queued_frames_.erase(stream_id);
|
|
1760
1754
|
if (write_scheduler_.StreamRegistered(stream_id)) {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include "quiche/http2/adapter/data_source.h"
|
|
14
14
|
#include "quiche/http2/adapter/event_forwarder.h"
|
|
15
15
|
#include "quiche/http2/adapter/header_validator.h"
|
|
16
|
+
#include "quiche/http2/adapter/header_validator_base.h"
|
|
16
17
|
#include "quiche/http2/adapter/http2_protocol.h"
|
|
17
18
|
#include "quiche/http2/adapter/http2_session.h"
|
|
18
19
|
#include "quiche/http2/adapter/http2_util.h"
|
|
@@ -71,6 +72,9 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
71
72
|
// Whether to allow `obs-text` (characters from hexadecimal 0x80 to 0xff) in
|
|
72
73
|
// header field values.
|
|
73
74
|
bool allow_obs_text = true;
|
|
75
|
+
// If true, validates header field names and values according to RFC 7230
|
|
76
|
+
// and RFC 7540.
|
|
77
|
+
bool validate_http_headers = true;
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
OgHttp2Session(Http2VisitorInterface& visitor, Options options);
|
|
@@ -145,8 +149,7 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
145
149
|
}
|
|
146
150
|
bool want_write() const override {
|
|
147
151
|
return !fatal_send_error_ &&
|
|
148
|
-
(!frames_.empty() || !buffered_data_.empty() ||
|
|
149
|
-
!connection_metadata_.empty() || HasReadyStream() ||
|
|
152
|
+
(!frames_.empty() || !buffered_data_.empty() || HasReadyStream() ||
|
|
150
153
|
!goaway_rejected_streams_.empty());
|
|
151
154
|
}
|
|
152
155
|
int GetRemoteWindowSize() const override { return connection_send_window_; }
|
|
@@ -177,14 +180,16 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
177
180
|
void OnGoAway(spdy::SpdyStreamId last_accepted_stream_id,
|
|
178
181
|
spdy::SpdyErrorCode error_code) override;
|
|
179
182
|
bool OnGoAwayFrameData(const char* goaway_data, size_t len) override;
|
|
180
|
-
void OnHeaders(spdy::SpdyStreamId stream_id,
|
|
183
|
+
void OnHeaders(spdy::SpdyStreamId stream_id, size_t payload_length,
|
|
184
|
+
bool has_priority, int weight,
|
|
181
185
|
spdy::SpdyStreamId parent_stream_id, bool exclusive, bool fin,
|
|
182
186
|
bool end) override;
|
|
183
187
|
void OnWindowUpdate(spdy::SpdyStreamId stream_id,
|
|
184
188
|
int delta_window_size) override;
|
|
185
189
|
void OnPushPromise(spdy::SpdyStreamId stream_id,
|
|
186
190
|
spdy::SpdyStreamId promised_stream_id, bool end) override;
|
|
187
|
-
void OnContinuation(spdy::SpdyStreamId stream_id,
|
|
191
|
+
void OnContinuation(spdy::SpdyStreamId stream_id, size_t payload_length,
|
|
192
|
+
bool end) override;
|
|
188
193
|
void OnAltSvc(spdy::SpdyStreamId /*stream_id*/, absl::string_view /*origin*/,
|
|
189
194
|
const spdy::SpdyAltSvcWireFormat::
|
|
190
195
|
AlternativeServiceVector& /*altsvc_vector*/) override;
|
|
@@ -209,8 +214,6 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
209
214
|
void OnFramePayload(const char* data, size_t len) override;
|
|
210
215
|
|
|
211
216
|
private:
|
|
212
|
-
using MetadataSequence = std::vector<std::unique_ptr<MetadataSource>>;
|
|
213
|
-
|
|
214
217
|
struct QUICHE_EXPORT_PRIVATE StreamState {
|
|
215
218
|
StreamState(int32_t stream_receive_window, int32_t stream_send_window,
|
|
216
219
|
WindowManager::WindowUpdateListener listener,
|
|
@@ -222,7 +225,6 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
222
225
|
|
|
223
226
|
WindowManager window_manager;
|
|
224
227
|
std::unique_ptr<DataFrameSource> outbound_body;
|
|
225
|
-
MetadataSequence outbound_metadata;
|
|
226
228
|
std::unique_ptr<spdy::SpdyHeaderBlock> trailers;
|
|
227
229
|
void* user_data = nullptr;
|
|
228
230
|
int32_t send_window;
|
|
@@ -245,9 +247,8 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
245
247
|
class QUICHE_EXPORT_PRIVATE PassthroughHeadersHandler
|
|
246
248
|
: public spdy::SpdyHeadersHandlerInterface {
|
|
247
249
|
public:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
: session_(session), visitor_(visitor) {}
|
|
250
|
+
PassthroughHeadersHandler(OgHttp2Session& session,
|
|
251
|
+
Http2VisitorInterface& visitor);
|
|
251
252
|
|
|
252
253
|
void set_stream_id(Http2StreamId stream_id) {
|
|
253
254
|
stream_id_ = stream_id;
|
|
@@ -265,18 +266,18 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
265
266
|
absl::string_view status_header() const {
|
|
266
267
|
QUICHE_DCHECK(type_ == HeaderType::RESPONSE ||
|
|
267
268
|
type_ == HeaderType::RESPONSE_100);
|
|
268
|
-
return validator_
|
|
269
|
+
return validator_->status_header();
|
|
269
270
|
}
|
|
270
271
|
absl::optional<size_t> content_length() const {
|
|
271
|
-
return validator_
|
|
272
|
+
return validator_->content_length();
|
|
272
273
|
}
|
|
273
|
-
void
|
|
274
|
+
void SetAllowExtendedConnect() { validator_->SetAllowExtendedConnect(); }
|
|
274
275
|
void SetMaxFieldSize(uint32_t field_size) {
|
|
275
|
-
validator_
|
|
276
|
+
validator_->SetMaxFieldSize(field_size);
|
|
276
277
|
}
|
|
277
278
|
void SetAllowObsText(bool allow) {
|
|
278
|
-
validator_
|
|
279
|
-
|
|
279
|
+
validator_->SetObsTextOption(allow ? ObsTextOption::kAllow
|
|
280
|
+
: ObsTextOption::kDisallow);
|
|
280
281
|
}
|
|
281
282
|
bool CanReceiveBody() const;
|
|
282
283
|
|
|
@@ -287,7 +288,7 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
287
288
|
Http2VisitorInterface::OnHeaderResult result_ =
|
|
288
289
|
Http2VisitorInterface::HEADER_OK;
|
|
289
290
|
// Validates header blocks according to the HTTP/2 specification.
|
|
290
|
-
|
|
291
|
+
std::unique_ptr<HeaderValidatorBase> validator_;
|
|
291
292
|
HeaderType type_ = HeaderType::RESPONSE;
|
|
292
293
|
bool frame_contains_fin_ = false;
|
|
293
294
|
};
|
|
@@ -359,7 +360,8 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
359
360
|
// Writes DATA frames for stream `stream_id`.
|
|
360
361
|
SendResult WriteForStream(Http2StreamId stream_id);
|
|
361
362
|
|
|
362
|
-
|
|
363
|
+
void SerializeMetadata(Http2StreamId stream_id,
|
|
364
|
+
std::unique_ptr<MetadataSource> source);
|
|
363
365
|
|
|
364
366
|
void SendHeaders(Http2StreamId stream_id, spdy::SpdyHeaderBlock headers,
|
|
365
367
|
bool end_stream);
|
|
@@ -429,6 +431,8 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
429
431
|
// Receives events when inbound frames are parsed.
|
|
430
432
|
Http2VisitorInterface& visitor_;
|
|
431
433
|
|
|
434
|
+
const Options options_;
|
|
435
|
+
|
|
432
436
|
// Forwards received events to the session if it can accept them.
|
|
433
437
|
EventForwarder event_forwarder_;
|
|
434
438
|
|
|
@@ -487,13 +491,9 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
487
491
|
absl::flat_hash_map<Http2StreamId, int> queued_frames_;
|
|
488
492
|
// Includes streams that are currently ready to write trailers.
|
|
489
493
|
absl::flat_hash_set<Http2StreamId> trailers_ready_;
|
|
490
|
-
// Includes streams that are currently ready to write metadata.
|
|
491
|
-
absl::flat_hash_set<Http2StreamId> metadata_ready_;
|
|
492
494
|
// Includes streams that will not be written due to receipt of GOAWAY.
|
|
493
495
|
absl::flat_hash_set<Http2StreamId> goaway_rejected_streams_;
|
|
494
496
|
|
|
495
|
-
MetadataSequence connection_metadata_;
|
|
496
|
-
|
|
497
497
|
Http2StreamId next_stream_id_ = 1;
|
|
498
498
|
// The highest received stream ID is the highest stream ID in any frame read
|
|
499
499
|
// from the peer. The highest processed stream ID is the highest stream ID for
|
|
@@ -519,7 +519,6 @@ class QUICHE_EXPORT_PRIVATE OgHttp2Session
|
|
|
519
519
|
std::numeric_limits<uint32_t>::max();
|
|
520
520
|
uint32_t max_inbound_concurrent_streams_ =
|
|
521
521
|
std::numeric_limits<uint32_t>::max();
|
|
522
|
-
const Options options_;
|
|
523
522
|
|
|
524
523
|
// The HPACK encoder header table capacity that will be applied when
|
|
525
524
|
// acking SETTINGS from the peer. Only contains a value if the peer advertises
|
|
@@ -61,7 +61,7 @@ bool TestDataFrameSource::Send(absl::string_view frame_header,
|
|
|
61
61
|
} else if (result == 0) {
|
|
62
62
|
// Write blocked.
|
|
63
63
|
return false;
|
|
64
|
-
} else if (static_cast<
|
|
64
|
+
} else if (static_cast<size_t>(result) < concatenated.size()) {
|
|
65
65
|
// Probably need to handle this better within this test class.
|
|
66
66
|
QUICHE_LOG(DFATAL)
|
|
67
67
|
<< "DATA frame not fully flushed. Connection will be corrupt!";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
#include "absl/functional/bind_front.h"
|
|
6
6
|
#include "quiche/http2/test_tools/http2_random.h"
|
|
7
|
+
#include "quiche/common/platform/api/quiche_expect_bug.h"
|
|
7
8
|
#include "quiche/common/platform/api/quiche_test.h"
|
|
8
|
-
#include "quiche/common/platform/api/quiche_test_helpers.h"
|
|
9
9
|
|
|
10
10
|
namespace http2 {
|
|
11
11
|
namespace adapter {
|
|
@@ -24,7 +24,7 @@ class WindowManagerPeer {
|
|
|
24
24
|
|
|
25
25
|
namespace {
|
|
26
26
|
|
|
27
|
-
class WindowManagerTest : public ::
|
|
27
|
+
class WindowManagerTest : public quiche::test::QuicheTest {
|
|
28
28
|
protected:
|
|
29
29
|
WindowManagerTest()
|
|
30
30
|
: wm_(kDefaultLimit, absl::bind_front(&WindowManagerTest::OnCall, this)),
|
|
@@ -72,7 +72,9 @@ TEST_F(WindowManagerTest, DataBufferedAndFlushed) {
|
|
|
72
72
|
wm_.MarkDataBuffered(buffered);
|
|
73
73
|
total_buffered += buffered;
|
|
74
74
|
EXPECT_TRUE(call_sequence_.empty());
|
|
75
|
-
int64_t flushed =
|
|
75
|
+
int64_t flushed = (total_buffered - total_flushed) > 0
|
|
76
|
+
? random_.Uniform(total_buffered - total_flushed)
|
|
77
|
+
: 0;
|
|
76
78
|
wm_.MarkDataFlushed(flushed);
|
|
77
79
|
total_flushed += flushed;
|
|
78
80
|
}
|
|
@@ -99,8 +101,12 @@ TEST_F(WindowManagerTest, AvoidBufferedUnderflow) {
|
|
|
99
101
|
wm_.MarkDataBuffered(42);
|
|
100
102
|
EXPECT_EQ(peer_.buffered(), 42u);
|
|
101
103
|
// Don't flush more than has been buffered!
|
|
102
|
-
EXPECT_QUICHE_BUG(
|
|
103
|
-
|
|
104
|
+
EXPECT_QUICHE_BUG(
|
|
105
|
+
{
|
|
106
|
+
wm_.MarkDataFlushed(43);
|
|
107
|
+
EXPECT_EQ(peer_.buffered(), 0u);
|
|
108
|
+
},
|
|
109
|
+
"buffered underflow");
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
// This test verifies that WindowManager notifies its listener when window is
|