CCopybara-ServiceFix Quiche test failing during Envoy Quiche roll
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Add an HttpValidationPolicy field for handling invalid methods RFC 9110 specifies that a request method must be a token so we add a new HttpValidationPolicy and accompanying logic to give Quiche integrators the ability to enforce this grammar if they desire. We exhaustively cover the valid range of US-ASCII input and beyond. There are four primary cases: 1. Graphical characters: currently, Balsa allows 17 characters from this range which produce methods that are not valid tokens. 2. Control characters (without whitespace): when control characters are found, Balsa properly strips them and does not return them with the method. 3. Extended ASCII characters (i.e. 128 and higher): Balsa currently allows methods with these characters but they are not valid tokens. 4. Whitespace control characters: all whitespace characters are technically invalid tokens but since their presence changes the flow of parsing, Balsa does not include them with the method so they are unaffected. Relevant grammar: `` tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "" / "|" / "~" / DIGIT / ALPHA token = 1*tchar method = token ``` Protected by unused HTTP validation policy. PiperOrigin-RevId: 831982366 | 7 个月前 | |
Add an HttpValidationPolicy field for handling invalid methods RFC 9110 specifies that a request method must be a token so we add a new HttpValidationPolicy and accompanying logic to give Quiche integrators the ability to enforce this grammar if they desire. We exhaustively cover the valid range of US-ASCII input and beyond. There are four primary cases: 1. Graphical characters: currently, Balsa allows 17 characters from this range which produce methods that are not valid tokens. 2. Control characters (without whitespace): when control characters are found, Balsa properly strips them and does not return them with the method. 3. Extended ASCII characters (i.e. 128 and higher): Balsa currently allows methods with these characters but they are not valid tokens. 4. Whitespace control characters: all whitespace characters are technically invalid tokens but since their presence changes the flow of parsing, Balsa does not include them with the method so they are unaffected. Relevant grammar: `` tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "" / "|" / "~" / DIGIT / ALPHA token = 1*tchar method = token ``` Protected by unused HTTP validation policy. PiperOrigin-RevId: 831982366 | 7 个月前 | |
Add code count when new validation policy is on and invalid methods are detected. This will help with verifying the RCTH rollout and per-customer override. Protected by FLAGS_disallow_invalid_request_methods in L1 RCTH. PiperOrigin-RevId: 832391275 | 7 个月前 | |
Introduce a BalsaHeaders API to fold continuation lines, and call it from BalsaFrame. Protected by HTTP validation option sanitize_obs_fold_in_header_values. PiperOrigin-RevId: 808694720 | 9 个月前 | |
Fix Quiche test failing during Envoy Quiche roll This test passes in google3 but fails when run during the go/envoy-quic-import when running against int value 128. 128 overflows the signed char and wraps negative when Quiche tests are run with Envoy's build which leads to the failure external/com_github_google_quiche/quiche/balsa/balsa_frame_test.cc:769: Failure Failed Unexpected character: <euro character>. For some reason, it does not have this same behavior in google3 (probably some clang/llvm options). Tested by updating balsa_frame_test.cc file in the bazel cache (~/.cache/bazel) and running bazelisk test @com_github_google_quiche//... PiperOrigin-RevId: 832450993 | 7 个月前 | |
Introduce a BalsaHeaders API to fold continuation lines, and call it from BalsaFrame. Protected by HTTP validation option sanitize_obs_fold_in_header_values. PiperOrigin-RevId: 808694720 | 9 个月前 | |
Fix typo in comment: "textural" -> "textual". PiperOrigin-RevId: 813876371 | 9 个月前 | |
Resolve the following 58 technical "build-missing-std-includes" debt issues: missing #include <string> for 'std::string' (google3-build-missing-std-includes) //depot/google3/third_party/quic/tools/web_transport_test_server.cc //depot/google3/third_party/quiche/common/btree_scheduler_test.cc //depot/google3/third_party/quiche/common/http/http_header_block.cc //depot/google3/third_party/quiche/common/http/http_header_block_test.cc //depot/google3/third_party/quiche/common/masque/connect_udp_datagram_payload.cc //depot/google3/third_party/quiche/common/platform/api/quiche_file_utils.cc //depot/google3/third_party/quiche/common/platform/api/quiche_file_utils_test.cc //depot/google3/third_party/quiche/common/platform/api/quiche_stack_trace_test.cc //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc //depot/google3/third_party/quiche/common/quiche_data_reader.cc //depot/google3/third_party/quiche/common/quiche_data_writer.cc //depot/google3/third_party/quiche/common/quiche_data_writer_test.cc //depot/google3/third_party/quiche/common/quiche_mem_slice_storage_test.cc //depot/google3/third_party/quiche/common/quiche_text_utils.cc //depot/google3/third_party/quiche/common/structured_headers_generated_test.cc //depot/google3/third_party/quiche/web_transport/complete_buffer_visitor.cc missing #include <vector> for 'std::vector' (google3-build-missing-std-includes) //depot/google3/third_party/quic/tools/web_transport_test_server.cc //depot/google3/third_party/quiche/common/platform/api/quiche_file_utils.cc //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_default_proof_providers_impl.cc //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc //depot/google3/third_party/quiche/common/quiche_callbacks_test.cc //depot/google3/third_party/quiche/common/quiche_data_writer_test.cc //depot/google3/third_party/quiche/common/wire_serialization_test.cc //depot/google3/third_party/spdy/core/hpack/hpack_encoder.cc missing #include <utility> for 'std::move' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/balsa/balsa_headers_sequence.cc //depot/google3/third_party/quiche/common/platform/api/quiche_mem_slice_test.cc //depot/google3/third_party/quiche/common/platform/api/quiche_reference_counted_test.cc //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc //depot/google3/third_party/quiche/common/quiche_callbacks_test.cc //depot/google3/third_party/quiche/common/quiche_circular_deque_test.cc //depot/google3/third_party/quiche/common/quiche_mem_slice_storage.cc //depot/google3/third_party/quiche/common/quiche_simple_arena.cc //depot/google3/third_party/quiche/common/simple_buffer_allocator_test.cc //depot/google3/third_party/quiche/oblivious_http/buffers/oblivious_http_integration_test.cc //depot/google3/third_party/quiche/oblivious_http/common/oblivious_http_header_key_config.cc missing #include <algorithm> for 'std::all_of' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/binary_http/binary_http_message.cc missing #include <ostream> for 'std::ostream' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/binary_http/binary_http_message.cc //depot/google3/third_party/quiche/common/btree_scheduler_test.cc //depot/google3/third_party/quiche/common/quiche_circular_deque_test.cc missing #include <sstream> for 'std::ostringstream' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/binary_http/binary_http_message_test.cc missing #include <tuple> for 'std::make_tuple' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/btree_scheduler_test.cc //depot/google3/third_party/quiche/common/quiche_linked_hash_map_test.cc missing #include <ios> for 'std::hex' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/http/http_header_block.cc missing #include <memory> for 'std::unique_ptr' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_default_proof_providers_impl.cc //depot/google3/third_party/quiche/common/test_tools/quiche_test_utils.cc missing #include <optional> for 'std::optional' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/platform/default/quiche_platform_impl/quiche_time_utils_impl.cc //depot/google3/third_party/quiche/common/quiche_text_utils.cc //depot/google3/third_party/quiche/common/structured_headers_generated_test.cc missing #include <deque> for 'std::deque' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/print_elements_test.cc missing #include <algorithm> for 'std::min' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/quiche_buffer_allocator.cc //depot/google3/third_party/quiche/common/quiche_mem_slice_storage.cc //depot/google3/third_party/quiche/common/quiche_text_utils.cc //depot/google3/third_party/quiche/common/test_tools/quiche_test_utils.cc missing #include <utility> for 'std::pair' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/structured_headers_generated_test.cc //depot/google3/third_party/quiche/common/structured_headers_test.cc missing #include <array> for 'std::array' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/common/wire_serialization_test.cc missing #include <algorithm> for 'std::max' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/oblivious_http/buffers/oblivious_http_response_test.cc missing #include <functional> for 'std::greater' (google3-build-missing-std-includes) //depot/google3/third_party/quiche/oblivious_http/common/oblivious_http_header_key_config.cc CL generated via Upkeep (go/upkeep). #upkeep #autofix #codehealth #cleanup PiperOrigin-RevId: 635885466 | 2 年前 | |
Add BalsaHeadersSequence::IsEmpty(). This method will eventually replace the BackendResponder calls to HasContinueResponseHeaders() in [1], as these conditions should be generalized to other interim headers. [1] http://google3/gfe/gfe2/jetstream/backend_responder.cc;l=985,1002;rcl=538013523 PiperOrigin-RevId: 540667259 | 3 年前 | |
Add BalsaHeadersSequence::IsEmpty(). This method will eventually replace the BackendResponder calls to HasContinueResponseHeaders() in [1], as these conditions should be generalized to other interim headers. [1] http://google3/gfe/gfe2/jetstream/backend_responder.cc;l=985,1002;rcl=538013523 PiperOrigin-RevId: 540667259 | 3 年前 | |
Add an HttpValidationPolicy field for handling invalid methods RFC 9110 specifies that a request method must be a token so we add a new HttpValidationPolicy and accompanying logic to give Quiche integrators the ability to enforce this grammar if they desire. We exhaustively cover the valid range of US-ASCII input and beyond. There are four primary cases: 1. Graphical characters: currently, Balsa allows 17 characters from this range which produce methods that are not valid tokens. 2. Control characters (without whitespace): when control characters are found, Balsa properly strips them and does not return them with the method. 3. Extended ASCII characters (i.e. 128 and higher): Balsa currently allows methods with these characters but they are not valid tokens. 4. Whitespace control characters: all whitespace characters are technically invalid tokens but since their presence changes the flow of parsing, Balsa does not include them with the method so they are unaffected. Relevant grammar: `` tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "" / "|" / "~" / DIGIT / ALPHA token = 1*tchar method = token ``` Protected by unused HTTP validation policy. PiperOrigin-RevId: 831982366 | 7 个月前 | |
Remove BalsaVisitorInterface::ProcessTrailers(). This method is no longer called from BalsaFrame. This CL removes the visitor callback and subclass implementations. PiperOrigin-RevId: 590704307 | 2 年前 | |
Rename QUICHE_EXPORT_PRIVATE to QUICHE_EXPORT We do not distinguish between those in practice, and this is causing confusion, so we should stick to one, and QUICHE_EXPORT is shorter. PiperOrigin-RevId: 482823752 | 3 年前 | |
Replace uses of std::function with quiche::UnretainedCallback where appropriate UnretainedCallback is not nullable, unlike std::function, so in one of the places it gets replaced with an absl::optional<UnretainedCallback>. PiperOrigin-RevId: 536781656 | 3 年前 | |
Add helper methods to check a string's RFC 9110, 5.6.2 compliance https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2 shows the grammar for a token and gives an _inclusive_ listing of characters. Balsa does not currently have a helper which exactly matches this listing of characters. The closest thing we have is the _exclusive_ list kInvalidHeaderKeyCharList which _almost_ matches this inclusive list with the exception of : for the set of US-ASCII characters. We add the helper here for use by future changes. Protected by adding helper method for future CL. PiperOrigin-RevId: 826236709 | 8 个月前 | |
Add helper methods to check a string's RFC 9110, 5.6.2 compliance https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2 shows the grammar for a token and gives an _inclusive_ listing of characters. Balsa does not currently have a helper which exactly matches this listing of characters. The closest thing we have is the _exclusive_ list kInvalidHeaderKeyCharList which _almost_ matches this inclusive list with the exception of : for the set of US-ASCII characters. We add the helper here for use by future changes. Protected by adding helper method for future CL. PiperOrigin-RevId: 826236709 | 8 个月前 | |
Add helper methods to check a string's RFC 9110, 5.6.2 compliance https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2 shows the grammar for a token and gives an _inclusive_ listing of characters. Balsa does not currently have a helper which exactly matches this listing of characters. The closest thing we have is the _exclusive_ list kInvalidHeaderKeyCharList which _almost_ matches this inclusive list with the exception of : for the set of US-ASCII characters. We add the helper here for use by future changes. Protected by adding helper method for future CL. PiperOrigin-RevId: 826236709 | 8 个月前 | |
Add an HttpValidationPolicy field for handling invalid methods RFC 9110 specifies that a request method must be a token so we add a new HttpValidationPolicy and accompanying logic to give Quiche integrators the ability to enforce this grammar if they desire. We exhaustively cover the valid range of US-ASCII input and beyond. There are four primary cases: 1. Graphical characters: currently, Balsa allows 17 characters from this range which produce methods that are not valid tokens. 2. Control characters (without whitespace): when control characters are found, Balsa properly strips them and does not return them with the method. 3. Extended ASCII characters (i.e. 128 and higher): Balsa currently allows methods with these characters but they are not valid tokens. 4. Whitespace control characters: all whitespace characters are technically invalid tokens but since their presence changes the flow of parsing, Balsa does not include them with the method so they are unaffected. Relevant grammar: `` tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "" / "|" / "~" / DIGIT / ALPHA token = 1*tchar method = token ``` Protected by unused HTTP validation policy. PiperOrigin-RevId: 831982366 | 7 个月前 | |
Remove BalsaVisitorInterface::ProcessTrailers(). This method is no longer called from BalsaFrame. This CL removes the visitor callback and subclass implementations. PiperOrigin-RevId: 590704307 | 2 年前 | |
Remove QuicheMemSlice::impl() accessor. This accessor lets callers access MemSlice internals that we should not expose. Instead, in the one place it is used, return a unique_ptr<char[]> and convert it to gfe::MemSlice directly. PiperOrigin-RevId: 588864727 | 2 年前 | |
Remove QuicheMemSlice::impl() accessor. This accessor lets callers access MemSlice internals that we should not expose. Instead, in the one place it is used, return a unique_ptr<char[]> and convert it to gfe::MemSlice directly. PiperOrigin-RevId: 588864727 | 2 年前 | |
Remove QuicheMemSlice::impl() accessor. This accessor lets callers access MemSlice internals that we should not expose. Instead, in the one place it is used, return a unique_ptr<char[]> and convert it to gfe::MemSlice directly. PiperOrigin-RevId: 588864727 | 2 年前 | |
Move quiche/common/balsa to quiche/balsa. PiperOrigin-RevId: 448235250 | 4 年前 | |
Move quiche/common/balsa to quiche/balsa. PiperOrigin-RevId: 448235250 | 4 年前 |