@fails-components/webtransport-transport-http3-quiche 1.1.3 → 1.2.0
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/CMakeLists.txt +51 -50
- package/package.json +5 -5
- package/src/http3backendresponse.cc +1 -1
- package/src/http3backendresponse.h +13 -13
- package/src/http3client.cc +57 -25
- package/src/http3client.h +19 -17
- package/src/http3clientsession.cc +1 -1
- package/src/http3clientsession.h +2 -2
- package/src/http3clientstream.h +2 -2
- package/src/http3server.cc +10 -1
- package/src/http3server.h +1 -1
- package/src/http3serverbackend.cc +3 -3
- package/src/http3serverbackend.h +3 -3
- package/src/http3serversession.cc +4 -1
- package/src/http3serverstream.cc +11 -11
- package/src/http3serverstream.h +7 -7
- package/src/http3wtsessionvisitor.cc +35 -16
- package/src/http3wtsessionvisitor.h +76 -14
- package/src/http3wtstreamvisitor.cc +10 -0
- package/src/http3wtstreamvisitor.h +30 -1
- package/src/librarymain.cc +2 -0
- package/platform/quiche_platform_impl/quiche_mutex_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_prefetch_impl.h +0 -11
package/CMakeLists.txt
CHANGED
|
@@ -27,6 +27,7 @@ ENDIF(WIN32)
|
|
|
27
27
|
|
|
28
28
|
set(ABSL_PROPAGATE_CXX_STD ON)
|
|
29
29
|
# include abseil
|
|
30
|
+
set(ABSL_MSVC_STATIC_RUNTIME ON)
|
|
30
31
|
add_subdirectory(third_party/abseil-cpp EXCLUDE_FROM_ALL)
|
|
31
32
|
|
|
32
33
|
|
|
@@ -82,12 +83,10 @@ platform/quiche_platform_impl/quiche_event_loop_impl.h
|
|
|
82
83
|
platform/quiche_platform_impl/quiche_bug_tracker_impl.h
|
|
83
84
|
platform/quiche_platform_impl/quiche_googleurl_impl.h
|
|
84
85
|
platform/quiche_platform_impl/quiche_iovec_impl.h
|
|
85
|
-
platform/quiche_platform_impl/quiche_mutex_impl.h
|
|
86
86
|
platform/quiche_platform_impl/quiche_stack_trace_impl.h
|
|
87
87
|
platform/quiche_platform_impl/quiche_stream_buffer_allocator_impl.h
|
|
88
88
|
platform/quiche_platform_impl/quiche_time_utils_impl.h
|
|
89
89
|
platform/quiche_platform_impl/quiche_udp_socket_platform_impl.h
|
|
90
|
-
platform/quiche_platform_impl/quiche_prefetch_impl.h
|
|
91
90
|
platform/quiche_platform_impl/quiche_server_stats_impl.h
|
|
92
91
|
platform/quiche_platform_impl/quiche_mem_slice_impl.h
|
|
93
92
|
platform/quiche_platform_impl/quiche_flag_utils_impl.h
|
|
@@ -159,9 +158,6 @@ third_party/quiche/quiche/common/platform/api/quiche_hostname_utils.h
|
|
|
159
158
|
third_party/quiche/quiche/common/platform/api/quiche_iovec.h
|
|
160
159
|
third_party/quiche/quiche/common/platform/api/quiche_logging.h
|
|
161
160
|
third_party/quiche/quiche/common/platform/api/quiche_mem_slice.h
|
|
162
|
-
third_party/quiche/quiche/common/platform/api/quiche_mutex.cc
|
|
163
|
-
third_party/quiche/quiche/common/platform/api/quiche_mutex.h
|
|
164
|
-
third_party/quiche/quiche/common/platform/api/quiche_prefetch.h
|
|
165
161
|
third_party/quiche/quiche/common/platform/api/quiche_reference_counted.h
|
|
166
162
|
third_party/quiche/quiche/common/platform/api/quiche_time_utils.h
|
|
167
163
|
third_party/quiche/quiche/common/platform/api/quiche_url_utils.h
|
|
@@ -170,11 +166,9 @@ third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_co
|
|
|
170
166
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_flag_utils_impl.h
|
|
171
167
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_flags_impl.h
|
|
172
168
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_flags_impl.cc
|
|
173
|
-
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_prefetch_impl.h
|
|
174
169
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.cc
|
|
175
170
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h
|
|
176
|
-
third_party/quiche/quiche/common/platform/
|
|
177
|
-
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_mutex_impl.h
|
|
171
|
+
third_party/quiche/quiche/common/platform/api/quiche_mem_slice.cc
|
|
178
172
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.cc
|
|
179
173
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_stack_trace_impl.h
|
|
180
174
|
third_party/quiche/quiche/common/platform/default/quiche_platform_impl/quiche_iovec_impl.h
|
|
@@ -201,11 +195,15 @@ third_party/quiche/quiche/common/quiche_random.cc
|
|
|
201
195
|
third_party/quiche/quiche/common/quiche_random.h
|
|
202
196
|
third_party/quiche/quiche/common/quiche_simple_arena.cc
|
|
203
197
|
third_party/quiche/quiche/common/quiche_simple_arena.h
|
|
198
|
+
third_party/quiche/quiche/common/quiche_socket_address.cc
|
|
199
|
+
third_party/quiche/quiche/common/quiche_socket_address.h
|
|
204
200
|
third_party/quiche/quiche/common/quiche_text_utils.cc
|
|
205
201
|
third_party/quiche/quiche/common/quiche_text_utils.h
|
|
206
202
|
third_party/quiche/quiche/common/simple_buffer_allocator.cc
|
|
207
203
|
third_party/quiche/quiche/common/structured_headers.h
|
|
208
204
|
third_party/quiche/quiche/common/structured_headers.cc
|
|
205
|
+
third_party/quiche/quiche/common/vectorized_io_utils.h
|
|
206
|
+
third_party/quiche/quiche/common/vectorized_io_utils.cc
|
|
209
207
|
third_party/quiche/quiche/http2/adapter/data_source.h
|
|
210
208
|
third_party/quiche/quiche/http2/adapter/event_forwarder.cc
|
|
211
209
|
third_party/quiche/quiche/http2/adapter/event_forwarder.h
|
|
@@ -228,9 +226,30 @@ third_party/quiche/quiche/http2/adapter/oghttp2_util.cc
|
|
|
228
226
|
third_party/quiche/quiche/http2/adapter/oghttp2_util.h
|
|
229
227
|
third_party/quiche/quiche/http2/adapter/window_manager.cc
|
|
230
228
|
third_party/quiche/quiche/http2/adapter/window_manager.h
|
|
229
|
+
third_party/quiche/quiche/http2/core/http2_constants.cc
|
|
230
|
+
third_party/quiche/quiche/http2/core/http2_constants.h
|
|
231
|
+
third_party/quiche/quiche/http2/core/http2_frame_decoder_adapter.cc
|
|
232
|
+
third_party/quiche/quiche/http2/core/http2_frame_decoder_adapter.h
|
|
233
|
+
third_party/quiche/quiche/http2/core/http2_structures.cc
|
|
234
|
+
third_party/quiche/quiche/http2/core/http2_structures.h
|
|
231
235
|
third_party/quiche/quiche/http2/core/http2_trace_logging.cc
|
|
232
236
|
third_party/quiche/quiche/http2/core/http2_trace_logging.h
|
|
233
237
|
third_party/quiche/quiche/http2/core/priority_write_scheduler.h
|
|
238
|
+
third_party/quiche/quiche/http2/core/spdy_alt_svc_wire_format.cc
|
|
239
|
+
third_party/quiche/quiche/http2/core/spdy_alt_svc_wire_format.h
|
|
240
|
+
third_party/quiche/quiche/http2/core/spdy_bitmasks.h
|
|
241
|
+
third_party/quiche/quiche/http2/core/spdy_frame_builder.cc
|
|
242
|
+
third_party/quiche/quiche/http2/core/spdy_frame_builder.h
|
|
243
|
+
third_party/quiche/quiche/http2/core/spdy_framer.cc
|
|
244
|
+
third_party/quiche/quiche/http2/core/spdy_framer.h
|
|
245
|
+
third_party/quiche/quiche/http2/core/spdy_protocol.cc
|
|
246
|
+
third_party/quiche/quiche/http2/core/spdy_protocol.h
|
|
247
|
+
third_party/quiche/quiche/http2/core/recording_headers_handler.cc
|
|
248
|
+
third_party/quiche/quiche/http2/core/recording_headers_handler.h
|
|
249
|
+
third_party/quiche/quiche/http2/core/spdy_headers_handler_interface.h
|
|
250
|
+
third_party/quiche/quiche/http2/core/spdy_no_op_visitor.cc
|
|
251
|
+
third_party/quiche/quiche/http2/core/spdy_no_op_visitor.h
|
|
252
|
+
third_party/quiche/quiche/http2/core/zero_copy_output_buffer.h
|
|
234
253
|
third_party/quiche/quiche/http2/decoder/decode_buffer.cc
|
|
235
254
|
third_party/quiche/quiche/http2/decoder/decode_buffer.h
|
|
236
255
|
third_party/quiche/quiche/http2/decoder/decode_http2_structures.cc
|
|
@@ -299,6 +318,20 @@ third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_buffer.cc
|
|
|
299
318
|
third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_buffer.h
|
|
300
319
|
third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_listener.cc
|
|
301
320
|
third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h
|
|
321
|
+
third_party/quiche/quiche/http2/hpack/hpack_constants.cc
|
|
322
|
+
third_party/quiche/quiche/http2/hpack/hpack_constants.h
|
|
323
|
+
third_party/quiche/quiche/http2/hpack/hpack_decoder_adapter.cc
|
|
324
|
+
third_party/quiche/quiche/http2/hpack/hpack_decoder_adapter.h
|
|
325
|
+
third_party/quiche/quiche/http2/hpack/hpack_encoder.cc
|
|
326
|
+
third_party/quiche/quiche/http2/hpack/hpack_encoder.h
|
|
327
|
+
third_party/quiche/quiche/http2/hpack/hpack_entry.cc
|
|
328
|
+
third_party/quiche/quiche/http2/hpack/hpack_entry.h
|
|
329
|
+
third_party/quiche/quiche/http2/hpack/hpack_header_table.cc
|
|
330
|
+
third_party/quiche/quiche/http2/hpack/hpack_header_table.h
|
|
331
|
+
third_party/quiche/quiche/http2/hpack/hpack_output_stream.cc
|
|
332
|
+
third_party/quiche/quiche/http2/hpack/hpack_output_stream.h
|
|
333
|
+
third_party/quiche/quiche/http2/hpack/hpack_static_table.cc
|
|
334
|
+
third_party/quiche/quiche/http2/hpack/hpack_static_table.h
|
|
302
335
|
third_party/quiche/quiche/http2/hpack/hpack_static_table_entries.inc
|
|
303
336
|
third_party/quiche/quiche/http2/hpack/http2_hpack_constants.cc
|
|
304
337
|
third_party/quiche/quiche/http2/hpack/http2_hpack_constants.h
|
|
@@ -312,10 +345,6 @@ third_party/quiche/quiche/http2/hpack/varint/hpack_varint_decoder.cc
|
|
|
312
345
|
third_party/quiche/quiche/http2/hpack/varint/hpack_varint_decoder.h
|
|
313
346
|
third_party/quiche/quiche/http2/hpack/varint/hpack_varint_encoder.cc
|
|
314
347
|
third_party/quiche/quiche/http2/hpack/varint/hpack_varint_encoder.h
|
|
315
|
-
third_party/quiche/quiche/http2/http2_constants.cc
|
|
316
|
-
third_party/quiche/quiche/http2/http2_constants.h
|
|
317
|
-
third_party/quiche/quiche/http2/http2_structures.cc
|
|
318
|
-
third_party/quiche/quiche/http2/http2_structures.h
|
|
319
348
|
#third_party/quiche/quiche/http2/platform/api/http2_macros.h
|
|
320
349
|
#third_party/quiche/quiche/quic/bindings/quic_libevent.h
|
|
321
350
|
#third_party/quiche/quiche/quic/bindings/quic_libevent.cc
|
|
@@ -348,6 +377,8 @@ third_party/quiche/quiche/quic/core/congestion_control/hybrid_slow_start.h
|
|
|
348
377
|
third_party/quiche/quiche/quic/core/congestion_control/loss_detection_interface.h
|
|
349
378
|
third_party/quiche/quiche/quic/core/congestion_control/pacing_sender.cc
|
|
350
379
|
third_party/quiche/quiche/quic/core/congestion_control/pacing_sender.h
|
|
380
|
+
third_party/quiche/quiche/quic/core/congestion_control/prague_sender.cc
|
|
381
|
+
third_party/quiche/quiche/quic/core/congestion_control/prague_sender.h
|
|
351
382
|
third_party/quiche/quiche/quic/core/congestion_control/prr_sender.cc
|
|
352
383
|
third_party/quiche/quiche/quic/core/congestion_control/prr_sender.h
|
|
353
384
|
third_party/quiche/quiche/quic/core/congestion_control/rtt_stats.cc
|
|
@@ -471,6 +502,8 @@ third_party/quiche/quiche/quic/core/frames/quic_goaway_frame.cc
|
|
|
471
502
|
third_party/quiche/quiche/quic/core/frames/quic_goaway_frame.h
|
|
472
503
|
third_party/quiche/quiche/quic/core/frames/quic_handshake_done_frame.cc
|
|
473
504
|
third_party/quiche/quiche/quic/core/frames/quic_handshake_done_frame.h
|
|
505
|
+
third_party/quiche/quiche/quic/core/frames/quic_immediate_ack_frame.cc
|
|
506
|
+
third_party/quiche/quiche/quic/core/frames/quic_immediate_ack_frame.h
|
|
474
507
|
third_party/quiche/quiche/quic/core/frames/quic_inlined_frame.h
|
|
475
508
|
third_party/quiche/quiche/quic/core/frames/quic_max_streams_frame.cc
|
|
476
509
|
third_party/quiche/quiche/quic/core/frames/quic_max_streams_frame.h
|
|
@@ -563,8 +596,6 @@ third_party/quiche/quiche/quic/core/packet_number_indexed_queue.h
|
|
|
563
596
|
third_party/quiche/quiche/quic/core/proto/cached_network_parameters_proto.h
|
|
564
597
|
third_party/quiche/quiche/quic/core/proto/crypto_server_config_proto.h
|
|
565
598
|
third_party/quiche/quiche/quic/core/proto/source_address_token_proto.h
|
|
566
|
-
third_party/quiche/quiche/quic/core/qpack/qpack_blocking_manager.cc
|
|
567
|
-
third_party/quiche/quiche/quic/core/qpack/qpack_blocking_manager.h
|
|
568
599
|
third_party/quiche/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.cc
|
|
569
600
|
third_party/quiche/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.h
|
|
570
601
|
third_party/quiche/quiche/quic/core/qpack/qpack_decoder.cc
|
|
@@ -601,6 +632,8 @@ third_party/quiche/quiche/quic/core/qpack/qpack_static_table.cc
|
|
|
601
632
|
third_party/quiche/quiche/quic/core/qpack/qpack_static_table.h
|
|
602
633
|
third_party/quiche/quiche/quic/core/qpack/qpack_stream_receiver.h
|
|
603
634
|
third_party/quiche/quiche/quic/core/qpack/qpack_stream_sender_delegate.h
|
|
635
|
+
third_party/quiche/quiche/quic/core/qpack/new_qpack_blocking_manager.h
|
|
636
|
+
third_party/quiche/quiche/quic/core/qpack/new_qpack_blocking_manager.cc
|
|
604
637
|
third_party/quiche/quiche/quic/core/qpack/value_splitting_header_list.cc
|
|
605
638
|
third_party/quiche/quiche/quic/core/qpack/value_splitting_header_list.h
|
|
606
639
|
third_party/quiche/quiche/quic/core/quic_ack_listener_interface.cc
|
|
@@ -668,7 +701,6 @@ third_party/quiche/quiche/quic/core/quic_dispatcher.cc
|
|
|
668
701
|
third_party/quiche/quiche/quic/core/quic_dispatcher.h
|
|
669
702
|
third_party/quiche/quiche/quic/core/quic_error_codes.cc
|
|
670
703
|
third_party/quiche/quiche/quic/core/quic_error_codes.h
|
|
671
|
-
third_party/quiche/quiche/quic/core/quic_flags_list.h
|
|
672
704
|
third_party/quiche/quiche/quic/core/quic_flow_controller.cc
|
|
673
705
|
third_party/quiche/quiche/quic/core/quic_flow_controller.h
|
|
674
706
|
third_party/quiche/quiche/quic/core/quic_framer.cc
|
|
@@ -775,45 +807,14 @@ third_party/quiche/quiche/quic/platform/api/quic_logging.h
|
|
|
775
807
|
#third_party/quiche/quiche/quic/platform/api/quic_mem_slice_storage.cc
|
|
776
808
|
#third_party/quiche/quiche/quic/platform/api/quic_mem_slice_storage.h
|
|
777
809
|
third_party/quiche/quiche/quic/platform/api/quic_server_stats.h
|
|
778
|
-
third_party/quiche/quiche/quic/platform/api/quic_socket_address.cc
|
|
779
|
-
third_party/quiche/quiche/quic/platform/api/quic_socket_address.h
|
|
780
810
|
third_party/quiche/quiche/quic/platform/api/quic_stack_trace.h
|
|
781
811
|
third_party/quiche/quiche/quic/platform/api/quic_thread.h
|
|
782
812
|
third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.cc
|
|
783
813
|
third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.h
|
|
784
|
-
third_party/quiche/quiche/
|
|
785
|
-
third_party/quiche/quiche/
|
|
786
|
-
third_party/quiche/quiche/
|
|
787
|
-
third_party/quiche/quiche/
|
|
788
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_encoder.cc
|
|
789
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_encoder.h
|
|
790
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_entry.cc
|
|
791
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_entry.h
|
|
792
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_header_table.cc
|
|
793
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_header_table.h
|
|
794
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_output_stream.cc
|
|
795
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_output_stream.h
|
|
796
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_static_table.cc
|
|
797
|
-
third_party/quiche/quiche/spdy/core/hpack/hpack_static_table.h
|
|
798
|
-
third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.cc
|
|
799
|
-
third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.h
|
|
800
|
-
third_party/quiche/quiche/spdy/core/recording_headers_handler.cc
|
|
801
|
-
third_party/quiche/quiche/spdy/core/recording_headers_handler.h
|
|
802
|
-
third_party/quiche/quiche/spdy/core/spdy_alt_svc_wire_format.cc
|
|
803
|
-
third_party/quiche/quiche/spdy/core/spdy_alt_svc_wire_format.h
|
|
804
|
-
third_party/quiche/quiche/spdy/core/spdy_bitmasks.h
|
|
805
|
-
third_party/quiche/quiche/spdy/core/spdy_frame_builder.cc
|
|
806
|
-
third_party/quiche/quiche/spdy/core/spdy_frame_builder.h
|
|
807
|
-
#third_party/quiche/quiche/spdy/core/spdy_frame_reader.cc
|
|
808
|
-
#third_party/quiche/quiche/spdy/core/spdy_frame_reader.h
|
|
809
|
-
third_party/quiche/quiche/spdy/core/spdy_framer.cc
|
|
810
|
-
third_party/quiche/quiche/spdy/core/spdy_framer.h
|
|
811
|
-
third_party/quiche/quiche/spdy/core/spdy_headers_handler_interface.h
|
|
812
|
-
third_party/quiche/quiche/spdy/core/spdy_no_op_visitor.cc
|
|
813
|
-
third_party/quiche/quiche/spdy/core/spdy_no_op_visitor.h
|
|
814
|
-
third_party/quiche/quiche/spdy/core/spdy_protocol.cc
|
|
815
|
-
third_party/quiche/quiche/spdy/core/spdy_protocol.h
|
|
816
|
-
third_party/quiche/quiche/spdy/core/zero_copy_output_buffer.h
|
|
814
|
+
third_party/quiche/quiche/web_transport/web_transport_headers.cc
|
|
815
|
+
third_party/quiche/quiche/web_transport/web_transport_headers.h
|
|
816
|
+
third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.cc
|
|
817
|
+
third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.h
|
|
817
818
|
)
|
|
818
819
|
|
|
819
820
|
IF(APPLE OR WIN32)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fails-components/webtransport-transport-http3-quiche",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A component to add webtransport support (server and client) to node.js, transport using libquiche",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"@types/node": "^18.15.3",
|
|
51
51
|
"eslint": "^9.3.0",
|
|
52
52
|
"eslint-config-prettier": "^9.1.0",
|
|
53
|
-
"eslint-
|
|
54
|
-
"eslint-plugin-import": "^2.25.2",
|
|
53
|
+
"eslint-plugin-import": "^2.31.0",
|
|
55
54
|
"eslint-plugin-node": "^11.1.0",
|
|
56
55
|
"eslint-plugin-prettier": "^5.1.3",
|
|
57
|
-
"eslint-plugin-promise": "^
|
|
58
|
-
"eslint-plugin-standard": "^4.1.0",
|
|
56
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
59
57
|
"prettier": "^3.2.5",
|
|
58
|
+
"prettier-linter-helpers": "^1.0.0",
|
|
59
|
+
"synckit": "^0.11.4",
|
|
60
60
|
"typescript": "^4.8.4"
|
|
61
61
|
},
|
|
62
62
|
"binary": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
#include <memory>
|
|
15
15
|
|
|
16
16
|
#include "absl/strings/string_view.h"
|
|
17
|
-
#include "quiche/
|
|
17
|
+
#include "quiche/http2/core/spdy_protocol.h"
|
|
18
18
|
|
|
19
19
|
namespace quic
|
|
20
20
|
{
|
|
@@ -30,13 +30,13 @@ namespace quic
|
|
|
30
30
|
struct ServerPushInfo
|
|
31
31
|
{
|
|
32
32
|
ServerPushInfo(std::string request_url,
|
|
33
|
-
|
|
33
|
+
quiche::HttpHeaderBlock headers,
|
|
34
34
|
spdy::SpdyPriority priority,
|
|
35
35
|
std::string body);
|
|
36
36
|
ServerPushInfo(const ServerPushInfo &other);
|
|
37
37
|
|
|
38
38
|
std::string request_url;
|
|
39
|
-
|
|
39
|
+
quiche::HttpHeaderBlock headers;
|
|
40
40
|
spdy::SpdyPriority priority;
|
|
41
41
|
std::string body;
|
|
42
42
|
};
|
|
@@ -62,18 +62,18 @@ namespace quic
|
|
|
62
62
|
|
|
63
63
|
~Http3BackendResponse();
|
|
64
64
|
|
|
65
|
-
const std::vector<
|
|
65
|
+
const std::vector<quiche::HttpHeaderBlock> &early_hints() const
|
|
66
66
|
{
|
|
67
67
|
return early_hints_;
|
|
68
68
|
}
|
|
69
69
|
SpecialResponseType response_type() const { return response_type_; }
|
|
70
|
-
const
|
|
71
|
-
const
|
|
70
|
+
const quiche::HttpHeaderBlock &headers() const { return headers_; }
|
|
71
|
+
const quiche::HttpHeaderBlock &trailers() const { return trailers_; }
|
|
72
72
|
const absl::string_view body() const { return absl::string_view(body_); }
|
|
73
73
|
|
|
74
|
-
void AddEarlyHints(const
|
|
74
|
+
void AddEarlyHints(const quiche::HttpHeaderBlock &headers)
|
|
75
75
|
{
|
|
76
|
-
|
|
76
|
+
quiche::HttpHeaderBlock hints = headers.Clone();
|
|
77
77
|
hints[":status"] = "103";
|
|
78
78
|
early_hints_.push_back(std::move(hints));
|
|
79
79
|
}
|
|
@@ -83,11 +83,11 @@ namespace quic
|
|
|
83
83
|
response_type_ = response_type;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
void set_headers(
|
|
86
|
+
void set_headers(quiche::HttpHeaderBlock headers)
|
|
87
87
|
{
|
|
88
88
|
headers_ = std::move(headers);
|
|
89
89
|
}
|
|
90
|
-
void set_trailers(
|
|
90
|
+
void set_trailers(quiche::HttpHeaderBlock trailers)
|
|
91
91
|
{
|
|
92
92
|
trailers_ = std::move(trailers);
|
|
93
93
|
}
|
|
@@ -97,10 +97,10 @@ namespace quic
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
private:
|
|
100
|
-
std::vector<
|
|
100
|
+
std::vector<quiche::HttpHeaderBlock> early_hints_;
|
|
101
101
|
SpecialResponseType response_type_;
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
quiche::HttpHeaderBlock headers_;
|
|
103
|
+
quiche::HttpHeaderBlock trailers_;
|
|
104
104
|
std::string body_;
|
|
105
105
|
};
|
|
106
106
|
|
package/src/http3client.cc
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
#include "quiche/quic/tools/quic_url.h"
|
|
40
40
|
#include "quiche/common/quiche_text_utils.h"
|
|
41
41
|
|
|
42
|
-
using
|
|
42
|
+
using quiche::HttpHeaderBlock;
|
|
43
43
|
|
|
44
44
|
namespace quic
|
|
45
45
|
{
|
|
@@ -162,7 +162,8 @@ namespace quic
|
|
|
162
162
|
std::unique_ptr<ProofVerifier> proof_verifier,
|
|
163
163
|
std::unique_ptr<SessionCache> session_cache,
|
|
164
164
|
std::unique_ptr<QuicConnectionHelperInterface> helper,
|
|
165
|
-
QuicConfig config
|
|
165
|
+
QuicConfig config,
|
|
166
|
+
const std::vector<std::string>& protocols) :
|
|
166
167
|
initialized_(false),
|
|
167
168
|
store_response_(false),
|
|
168
169
|
latest_response_code_(-1),
|
|
@@ -188,7 +189,8 @@ namespace quic
|
|
|
188
189
|
num_attempts_connect_(0),
|
|
189
190
|
webtransport_server_support_inform_(false),
|
|
190
191
|
connection_debug_visitor_(nullptr),
|
|
191
|
-
priority_(HttpStreamPriority())
|
|
192
|
+
priority_(HttpStreamPriority()),
|
|
193
|
+
protocols_(protocols)
|
|
192
194
|
{
|
|
193
195
|
|
|
194
196
|
}
|
|
@@ -200,7 +202,7 @@ namespace quic
|
|
|
200
202
|
|
|
201
203
|
void Http3Client::setHostname(QuicSocketAddress server_address, const std::string &server_hostname)
|
|
202
204
|
{
|
|
203
|
-
server_id_ = QuicServerId(server_hostname, server_address.port()
|
|
205
|
+
server_id_ = QuicServerId(server_hostname, server_address.port());
|
|
204
206
|
set_server_address(server_address);
|
|
205
207
|
Initialize();
|
|
206
208
|
}
|
|
@@ -249,7 +251,7 @@ namespace quic
|
|
|
249
251
|
|
|
250
252
|
void Http3Client::SendRequest(const std::string &uri)
|
|
251
253
|
{
|
|
252
|
-
|
|
254
|
+
quiche::HttpHeaderBlock headers;
|
|
253
255
|
if (!PopulateHeaderBlockFromUrl(uri, &headers))
|
|
254
256
|
{
|
|
255
257
|
return;
|
|
@@ -259,7 +261,7 @@ namespace quic
|
|
|
259
261
|
|
|
260
262
|
void Http3Client::SendRequestAndRstTogether(const std::string &uri)
|
|
261
263
|
{
|
|
262
|
-
|
|
264
|
+
quiche::HttpHeaderBlock headers;
|
|
263
265
|
if (!PopulateHeaderBlockFromUrl(uri, &headers))
|
|
264
266
|
{
|
|
265
267
|
return;
|
|
@@ -275,13 +277,13 @@ namespace quic
|
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
void Http3Client::GetOrCreateStreamAndSendRequest(
|
|
278
|
-
const
|
|
280
|
+
const quiche::HttpHeaderBlock *headers, absl::string_view body, bool fin)
|
|
279
281
|
{
|
|
280
|
-
std::shared_ptr<
|
|
282
|
+
std::shared_ptr<quiche::HttpHeaderBlock> spdy_headers;
|
|
281
283
|
bool hasheaders = false;
|
|
282
284
|
if (headers != nullptr)
|
|
283
285
|
{
|
|
284
|
-
spdy_headers = std::make_shared<
|
|
286
|
+
spdy_headers = std::make_shared<quiche::HttpHeaderBlock>(headers->Clone());
|
|
285
287
|
hasheaders = true;
|
|
286
288
|
}
|
|
287
289
|
|
|
@@ -315,13 +317,13 @@ namespace quic
|
|
|
315
317
|
});
|
|
316
318
|
}
|
|
317
319
|
|
|
318
|
-
void Http3Client::SendMessageAsync(const
|
|
320
|
+
void Http3Client::SendMessageAsync(const quiche::HttpHeaderBlock &headers,
|
|
319
321
|
absl::string_view body)
|
|
320
322
|
{
|
|
321
323
|
return SendMessageAsync(headers, body, /*fin=*/true);
|
|
322
324
|
}
|
|
323
325
|
|
|
324
|
-
void Http3Client::SendMessageAsync(const
|
|
326
|
+
void Http3Client::SendMessageAsync(const quiche::HttpHeaderBlock &headers,
|
|
325
327
|
absl::string_view body, bool fin)
|
|
326
328
|
{
|
|
327
329
|
// Always force creation of a stream for SendMessage.
|
|
@@ -498,7 +500,7 @@ namespace quic
|
|
|
498
500
|
if (override_sni_set_)
|
|
499
501
|
{
|
|
500
502
|
// This should only be set before the initial Connect()
|
|
501
|
-
server_id_ = QuicServerId(override_sni_, address().port()
|
|
503
|
+
server_id_ = QuicServerId(override_sni_, address().port());
|
|
502
504
|
}
|
|
503
505
|
connection_in_progress_ = true;
|
|
504
506
|
connectionrecheck_ = true;
|
|
@@ -616,13 +618,22 @@ namespace quic
|
|
|
616
618
|
|
|
617
619
|
void Http3Client::openWTSessionInt(absl::string_view path)
|
|
618
620
|
{
|
|
619
|
-
|
|
621
|
+
quiche::HttpHeaderBlock headers;
|
|
620
622
|
headers[":scheme"] = "https";
|
|
621
623
|
headers[":authority"] = "localhost";
|
|
622
624
|
headers[":path"] = path;
|
|
623
625
|
headers[":method"] = "CONNECT";
|
|
624
626
|
headers[":protocol"] = "webtransport";
|
|
625
|
-
|
|
627
|
+
if (protocols_.size() > 0) { // not very efficient
|
|
628
|
+
std::string protocols = "";
|
|
629
|
+
for (size_t i=0; i < protocols_.size(); i++) {
|
|
630
|
+
protocols += protocols_[i];
|
|
631
|
+
if (i!= protocols_.size()-1) {
|
|
632
|
+
protocols += ',';
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
headers["wt-available-protocols"] = protocols;
|
|
636
|
+
}
|
|
626
637
|
SendMessageAsync(headers, "", /*fin=*/false);
|
|
627
638
|
}
|
|
628
639
|
|
|
@@ -915,7 +926,7 @@ namespace quic
|
|
|
915
926
|
return response_headers_complete_;
|
|
916
927
|
}
|
|
917
928
|
|
|
918
|
-
const
|
|
929
|
+
const quiche::HttpHeaderBlock *Http3Client::response_headers() const
|
|
919
930
|
{
|
|
920
931
|
for (std::pair<QuicStreamId, QuicSpdyClientStream *> stream : open_streams_)
|
|
921
932
|
{
|
|
@@ -928,7 +939,7 @@ namespace quic
|
|
|
928
939
|
return &response_headers_;
|
|
929
940
|
}
|
|
930
941
|
|
|
931
|
-
const
|
|
942
|
+
const quiche::HttpHeaderBlock &Http3Client::response_trailers() const
|
|
932
943
|
{
|
|
933
944
|
return response_trailers_;
|
|
934
945
|
}
|
|
@@ -964,7 +975,7 @@ namespace quic
|
|
|
964
975
|
}
|
|
965
976
|
|
|
966
977
|
void Http3Client::OnCompleteResponse(
|
|
967
|
-
QuicStreamId id, const
|
|
978
|
+
QuicStreamId id, const quiche::HttpHeaderBlock &response_headers,
|
|
968
979
|
const absl::string_view &response_body)
|
|
969
980
|
{
|
|
970
981
|
// implement
|
|
@@ -982,7 +993,7 @@ namespace quic
|
|
|
982
993
|
QuicSpdyClientStream *client_stream =
|
|
983
994
|
static_cast<QuicSpdyClientStream *>(stream);
|
|
984
995
|
|
|
985
|
-
const
|
|
996
|
+
const HttpHeaderBlock &response_headers = client_stream->response_headers();
|
|
986
997
|
|
|
987
998
|
OnCompleteResponse(stream->id(), response_headers, client_stream->data());
|
|
988
999
|
|
|
@@ -999,7 +1010,7 @@ namespace quic
|
|
|
999
1010
|
QUIC_LOG(ERROR) << "Invalid :status response header: " << status->second;
|
|
1000
1011
|
}
|
|
1001
1012
|
latest_response_headers_ = response_headers.DebugString();
|
|
1002
|
-
for (const
|
|
1013
|
+
for (const HttpHeaderBlock &headers :
|
|
1003
1014
|
client_stream->preliminary_headers())
|
|
1004
1015
|
{
|
|
1005
1016
|
absl::StrAppend(&preliminary_response_headers_, headers.DebugString());
|
|
@@ -1044,7 +1055,7 @@ namespace quic
|
|
|
1044
1055
|
}
|
|
1045
1056
|
|
|
1046
1057
|
Http3Client::Http3ClientDataToResend::Http3ClientDataToResend(
|
|
1047
|
-
std::unique_ptr<
|
|
1058
|
+
std::unique_ptr<quiche::HttpHeaderBlock> headers, absl::string_view body,
|
|
1048
1059
|
bool fin, Http3Client *client)
|
|
1049
1060
|
: headers_(std::move(headers)), body_(body), fin_(fin),
|
|
1050
1061
|
client_(client) {}
|
|
@@ -1071,8 +1082,8 @@ namespace quic
|
|
|
1071
1082
|
Http3Client::PerStreamState::PerStreamState(
|
|
1072
1083
|
QuicRstStreamErrorCode stream_error, bool response_complete,
|
|
1073
1084
|
bool response_headers_complete,
|
|
1074
|
-
const
|
|
1075
|
-
const absl::string_view response, const
|
|
1085
|
+
const quiche::HttpHeaderBlock &response_headers,
|
|
1086
|
+
const absl::string_view response, const quiche::HttpHeaderBlock &response_trailers,
|
|
1076
1087
|
uint64_t bytes_read, uint64_t bytes_written, int64_t response_body_size)
|
|
1077
1088
|
: stream_error(stream_error),
|
|
1078
1089
|
response_complete(response_complete),
|
|
@@ -1087,7 +1098,7 @@ namespace quic
|
|
|
1087
1098
|
Http3Client::PerStreamState::~PerStreamState() = default;
|
|
1088
1099
|
|
|
1089
1100
|
bool Http3Client::PopulateHeaderBlockFromUrl(
|
|
1090
|
-
const std::string &uri,
|
|
1101
|
+
const std::string &uri, quiche::HttpHeaderBlock *headers)
|
|
1091
1102
|
{
|
|
1092
1103
|
std::string url;
|
|
1093
1104
|
if (absl::StartsWith(uri, "https://") || absl::StartsWith(uri, "http://"))
|
|
@@ -1141,6 +1152,7 @@ namespace quic
|
|
|
1141
1152
|
{
|
|
1142
1153
|
bool allowPooling = false;
|
|
1143
1154
|
std::vector<WebTransportHash> serverCertificateHashes;
|
|
1155
|
+
std::vector<std::string> protocols;
|
|
1144
1156
|
std::string privkey;
|
|
1145
1157
|
QuicConfig cconfig;
|
|
1146
1158
|
auto env = info.Env();
|
|
@@ -1240,6 +1252,26 @@ namespace quic
|
|
|
1240
1252
|
cconfig.SetInitialMaxStreamDataBytesIncomingBidirectionalToSend(streamFlowControlWindowSizeLimitWindow);
|
|
1241
1253
|
cconfig.SetInitialMaxStreamDataBytesUnidirectionalToSend(streamFlowControlWindowSizeLimitWindow);
|
|
1242
1254
|
}
|
|
1255
|
+
if (lobj.Has("protocols") && !(lobj).Get("protocols").IsEmpty()) {
|
|
1256
|
+
Napi::Value protocolValue = (lobj).Get("protocols");
|
|
1257
|
+
if (protocolValue.IsArray())
|
|
1258
|
+
{
|
|
1259
|
+
Napi::Array protocolArray = protocolValue.As<Napi::Array>();
|
|
1260
|
+
unsigned int length = protocolArray.Length();
|
|
1261
|
+
|
|
1262
|
+
for (unsigned int i = 0; i < length; i++)
|
|
1263
|
+
{
|
|
1264
|
+
Napi::Value protocolValue = protocolArray.Get(i);
|
|
1265
|
+
Napi::String protocolString = protocolValue.ToString();
|
|
1266
|
+
protocols.push_back(protocolString.Utf8Value());
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
else
|
|
1270
|
+
{
|
|
1271
|
+
Napi::Error::New(env, "protocols is not an array").ThrowAsJavaScriptException();
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1243
1275
|
}
|
|
1244
1276
|
}
|
|
1245
1277
|
|
|
@@ -1271,7 +1303,7 @@ namespace quic
|
|
|
1271
1303
|
|
|
1272
1304
|
std::unique_ptr<Http3SessionCache> cache;
|
|
1273
1305
|
|
|
1274
|
-
client_ = std::make_unique<Http3Client>(this, std::move(verifier), std::move(cache), std::move(helper), cconfig);
|
|
1306
|
+
client_ = std::make_unique<Http3Client>(this, std::move(verifier), std::move(cache), std::move(helper), cconfig, protocols);
|
|
1275
1307
|
client_->SetUserAgentID("fails-components/webtransport");
|
|
1276
1308
|
|
|
1277
1309
|
Ref(); // do not garbage collect
|
|
@@ -1380,10 +1412,10 @@ namespace quic
|
|
|
1380
1412
|
|
|
1381
1413
|
void Http3ClientJS::processClientWebtransportSupport()
|
|
1382
1414
|
{
|
|
1415
|
+
Http3Client *obj = getObj();
|
|
1383
1416
|
Napi::HandleScope scope(Env());
|
|
1384
1417
|
Napi::Object objVal = Value().Get("jsobj").As<Napi::Object>();
|
|
1385
1418
|
Napi::Object retObj = Napi::Object::New(Env());
|
|
1386
|
-
|
|
1387
1419
|
objVal.Get("onClientWebTransportSupport")
|
|
1388
1420
|
.As<Napi::Function>()
|
|
1389
1421
|
.Call(objVal, {retObj});
|