@fails-components/webtransport-transport-http3-quiche 1.1.2 → 1.1.4

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 CHANGED
@@ -228,9 +228,26 @@ third_party/quiche/quiche/http2/adapter/oghttp2_util.cc
228
228
  third_party/quiche/quiche/http2/adapter/oghttp2_util.h
229
229
  third_party/quiche/quiche/http2/adapter/window_manager.cc
230
230
  third_party/quiche/quiche/http2/adapter/window_manager.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
231
233
  third_party/quiche/quiche/http2/core/http2_trace_logging.cc
232
234
  third_party/quiche/quiche/http2/core/http2_trace_logging.h
233
235
  third_party/quiche/quiche/http2/core/priority_write_scheduler.h
236
+ third_party/quiche/quiche/http2/core/spdy_alt_svc_wire_format.cc
237
+ third_party/quiche/quiche/http2/core/spdy_alt_svc_wire_format.h
238
+ third_party/quiche/quiche/http2/core/spdy_bitmasks.h
239
+ third_party/quiche/quiche/http2/core/spdy_frame_builder.cc
240
+ third_party/quiche/quiche/http2/core/spdy_frame_builder.h
241
+ third_party/quiche/quiche/http2/core/spdy_framer.cc
242
+ third_party/quiche/quiche/http2/core/spdy_framer.h
243
+ third_party/quiche/quiche/http2/core/spdy_protocol.cc
244
+ third_party/quiche/quiche/http2/core/spdy_protocol.h
245
+ third_party/quiche/quiche/http2/core/recording_headers_handler.cc
246
+ third_party/quiche/quiche/http2/core/recording_headers_handler.h
247
+ third_party/quiche/quiche/http2/core/spdy_headers_handler_interface.h
248
+ third_party/quiche/quiche/http2/core/spdy_no_op_visitor.cc
249
+ third_party/quiche/quiche/http2/core/spdy_no_op_visitor.h
250
+ third_party/quiche/quiche/http2/core/zero_copy_output_buffer.h
234
251
  third_party/quiche/quiche/http2/decoder/decode_buffer.cc
235
252
  third_party/quiche/quiche/http2/decoder/decode_buffer.h
236
253
  third_party/quiche/quiche/http2/decoder/decode_http2_structures.cc
@@ -299,6 +316,20 @@ third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_buffer.cc
299
316
  third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_buffer.h
300
317
  third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_listener.cc
301
318
  third_party/quiche/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h
319
+ third_party/quiche/quiche/http2/hpack/hpack_constants.cc
320
+ third_party/quiche/quiche/http2/hpack/hpack_constants.h
321
+ third_party/quiche/quiche/http2/hpack/hpack_decoder_adapter.cc
322
+ third_party/quiche/quiche/http2/hpack/hpack_decoder_adapter.h
323
+ third_party/quiche/quiche/http2/hpack/hpack_encoder.cc
324
+ third_party/quiche/quiche/http2/hpack/hpack_encoder.h
325
+ third_party/quiche/quiche/http2/hpack/hpack_entry.cc
326
+ third_party/quiche/quiche/http2/hpack/hpack_entry.h
327
+ third_party/quiche/quiche/http2/hpack/hpack_header_table.cc
328
+ third_party/quiche/quiche/http2/hpack/hpack_header_table.h
329
+ third_party/quiche/quiche/http2/hpack/hpack_output_stream.cc
330
+ third_party/quiche/quiche/http2/hpack/hpack_output_stream.h
331
+ third_party/quiche/quiche/http2/hpack/hpack_static_table.cc
332
+ third_party/quiche/quiche/http2/hpack/hpack_static_table.h
302
333
  third_party/quiche/quiche/http2/hpack/hpack_static_table_entries.inc
303
334
  third_party/quiche/quiche/http2/hpack/http2_hpack_constants.cc
304
335
  third_party/quiche/quiche/http2/hpack/http2_hpack_constants.h
@@ -348,6 +379,8 @@ third_party/quiche/quiche/quic/core/congestion_control/hybrid_slow_start.h
348
379
  third_party/quiche/quiche/quic/core/congestion_control/loss_detection_interface.h
349
380
  third_party/quiche/quiche/quic/core/congestion_control/pacing_sender.cc
350
381
  third_party/quiche/quiche/quic/core/congestion_control/pacing_sender.h
382
+ third_party/quiche/quiche/quic/core/congestion_control/prague_sender.cc
383
+ third_party/quiche/quiche/quic/core/congestion_control/prague_sender.h
351
384
  third_party/quiche/quiche/quic/core/congestion_control/prr_sender.cc
352
385
  third_party/quiche/quiche/quic/core/congestion_control/prr_sender.h
353
386
  third_party/quiche/quiche/quic/core/congestion_control/rtt_stats.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
@@ -762,6 +794,8 @@ third_party/quiche/quiche/quic/core/uber_received_packet_manager.cc
762
794
  third_party/quiche/quiche/quic/core/uber_received_packet_manager.h
763
795
  third_party/quiche/quiche/quic/core/web_transport_stats.h
764
796
  third_party/quiche/quiche/quic/core/web_transport_stats.cc
797
+ third_party/quiche/quiche/quic/core/web_transport_write_blocked_list.h
798
+ third_party/quiche/quiche/quic/core/web_transport_write_blocked_list.cc
765
799
  third_party/quiche/quiche/quic/platform/api/quic_bug_tracker.h
766
800
  third_party/quiche/quiche/quic/platform/api/quic_client_stats.h
767
801
  third_party/quiche/quiche/quic/platform/api/quic_export.h
@@ -779,39 +813,6 @@ third_party/quiche/quiche/quic/platform/api/quic_stack_trace.h
779
813
  third_party/quiche/quiche/quic/platform/api/quic_thread.h
780
814
  third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.cc
781
815
  third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.h
782
- third_party/quiche/quiche/spdy/core/hpack/hpack_constants.cc
783
- third_party/quiche/quiche/spdy/core/hpack/hpack_constants.h
784
- third_party/quiche/quiche/spdy/core/hpack/hpack_decoder_adapter.cc
785
- third_party/quiche/quiche/spdy/core/hpack/hpack_decoder_adapter.h
786
- third_party/quiche/quiche/spdy/core/hpack/hpack_encoder.cc
787
- third_party/quiche/quiche/spdy/core/hpack/hpack_encoder.h
788
- third_party/quiche/quiche/spdy/core/hpack/hpack_entry.cc
789
- third_party/quiche/quiche/spdy/core/hpack/hpack_entry.h
790
- third_party/quiche/quiche/spdy/core/hpack/hpack_header_table.cc
791
- third_party/quiche/quiche/spdy/core/hpack/hpack_header_table.h
792
- third_party/quiche/quiche/spdy/core/hpack/hpack_output_stream.cc
793
- third_party/quiche/quiche/spdy/core/hpack/hpack_output_stream.h
794
- third_party/quiche/quiche/spdy/core/hpack/hpack_static_table.cc
795
- third_party/quiche/quiche/spdy/core/hpack/hpack_static_table.h
796
- third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.cc
797
- third_party/quiche/quiche/spdy/core/http2_frame_decoder_adapter.h
798
- third_party/quiche/quiche/spdy/core/recording_headers_handler.cc
799
- third_party/quiche/quiche/spdy/core/recording_headers_handler.h
800
- third_party/quiche/quiche/spdy/core/spdy_alt_svc_wire_format.cc
801
- third_party/quiche/quiche/spdy/core/spdy_alt_svc_wire_format.h
802
- third_party/quiche/quiche/spdy/core/spdy_bitmasks.h
803
- third_party/quiche/quiche/spdy/core/spdy_frame_builder.cc
804
- third_party/quiche/quiche/spdy/core/spdy_frame_builder.h
805
- #third_party/quiche/quiche/spdy/core/spdy_frame_reader.cc
806
- #third_party/quiche/quiche/spdy/core/spdy_frame_reader.h
807
- third_party/quiche/quiche/spdy/core/spdy_framer.cc
808
- third_party/quiche/quiche/spdy/core/spdy_framer.h
809
- third_party/quiche/quiche/spdy/core/spdy_headers_handler_interface.h
810
- third_party/quiche/quiche/spdy/core/spdy_no_op_visitor.cc
811
- third_party/quiche/quiche/spdy/core/spdy_no_op_visitor.h
812
- third_party/quiche/quiche/spdy/core/spdy_protocol.cc
813
- third_party/quiche/quiche/spdy/core/spdy_protocol.h
814
- third_party/quiche/quiche/spdy/core/zero_copy_output_buffer.h
815
816
  )
816
817
 
817
818
  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.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "A component to add webtransport support (server and client) to node.js, transport using libquiche",
5
5
  "exports": {
6
6
  ".": {
@@ -15,7 +15,7 @@ namespace quic
15
15
 
16
16
  Http3BackendResponse::ServerPushInfo::ServerPushInfo(
17
17
  std::string request_url,
18
- spdy::Http2HeaderBlock headers,
18
+ quiche::HttpHeaderBlock headers,
19
19
  spdy::SpdyPriority priority,
20
20
  std::string body)
21
21
  : request_url(request_url),
@@ -30,13 +30,13 @@ namespace quic
30
30
  struct ServerPushInfo
31
31
  {
32
32
  ServerPushInfo(std::string request_url,
33
- spdy::Http2HeaderBlock headers,
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
- spdy::Http2HeaderBlock headers;
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<spdy::Http2HeaderBlock> &early_hints() const
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 spdy::Http2HeaderBlock &headers() const { return headers_; }
71
- const spdy::Http2HeaderBlock &trailers() const { return trailers_; }
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 spdy::Http2HeaderBlock &headers)
74
+ void AddEarlyHints(const quiche::HttpHeaderBlock &headers)
75
75
  {
76
- spdy::Http2HeaderBlock hints = headers.Clone();
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(spdy::Http2HeaderBlock headers)
86
+ void set_headers(quiche::HttpHeaderBlock headers)
87
87
  {
88
88
  headers_ = std::move(headers);
89
89
  }
90
- void set_trailers(spdy::Http2HeaderBlock 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<spdy::Http2HeaderBlock> early_hints_;
100
+ std::vector<quiche::HttpHeaderBlock> early_hints_;
101
101
  SpecialResponseType response_type_;
102
- spdy::Http2HeaderBlock headers_;
103
- spdy::Http2HeaderBlock trailers_;
102
+ quiche::HttpHeaderBlock headers_;
103
+ quiche::HttpHeaderBlock trailers_;
104
104
  std::string body_;
105
105
  };
106
106
 
@@ -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 spdy::Http2HeaderBlock;
42
+ using quiche::HttpHeaderBlock;
43
43
 
44
44
  namespace quic
45
45
  {
@@ -200,7 +200,7 @@ namespace quic
200
200
 
201
201
  void Http3Client::setHostname(QuicSocketAddress server_address, const std::string &server_hostname)
202
202
  {
203
- server_id_ = QuicServerId(server_hostname, server_address.port(), false);
203
+ server_id_ = QuicServerId(server_hostname, server_address.port());
204
204
  set_server_address(server_address);
205
205
  Initialize();
206
206
  }
@@ -249,7 +249,7 @@ namespace quic
249
249
 
250
250
  void Http3Client::SendRequest(const std::string &uri)
251
251
  {
252
- spdy::Http2HeaderBlock headers;
252
+ quiche::HttpHeaderBlock headers;
253
253
  if (!PopulateHeaderBlockFromUrl(uri, &headers))
254
254
  {
255
255
  return;
@@ -259,7 +259,7 @@ namespace quic
259
259
 
260
260
  void Http3Client::SendRequestAndRstTogether(const std::string &uri)
261
261
  {
262
- spdy::Http2HeaderBlock headers;
262
+ quiche::HttpHeaderBlock headers;
263
263
  if (!PopulateHeaderBlockFromUrl(uri, &headers))
264
264
  {
265
265
  return;
@@ -275,13 +275,13 @@ namespace quic
275
275
  }
276
276
 
277
277
  void Http3Client::GetOrCreateStreamAndSendRequest(
278
- const spdy::Http2HeaderBlock *headers, absl::string_view body, bool fin)
278
+ const quiche::HttpHeaderBlock *headers, absl::string_view body, bool fin)
279
279
  {
280
- std::shared_ptr<spdy::Http2HeaderBlock> spdy_headers;
280
+ std::shared_ptr<quiche::HttpHeaderBlock> spdy_headers;
281
281
  bool hasheaders = false;
282
282
  if (headers != nullptr)
283
283
  {
284
- spdy_headers = std::make_shared<spdy::Http2HeaderBlock>(headers->Clone());
284
+ spdy_headers = std::make_shared<quiche::HttpHeaderBlock>(headers->Clone());
285
285
  hasheaders = true;
286
286
  }
287
287
 
@@ -315,13 +315,13 @@ namespace quic
315
315
  });
316
316
  }
317
317
 
318
- void Http3Client::SendMessageAsync(const spdy::Http2HeaderBlock &headers,
318
+ void Http3Client::SendMessageAsync(const quiche::HttpHeaderBlock &headers,
319
319
  absl::string_view body)
320
320
  {
321
321
  return SendMessageAsync(headers, body, /*fin=*/true);
322
322
  }
323
323
 
324
- void Http3Client::SendMessageAsync(const spdy::Http2HeaderBlock &headers,
324
+ void Http3Client::SendMessageAsync(const quiche::HttpHeaderBlock &headers,
325
325
  absl::string_view body, bool fin)
326
326
  {
327
327
  // Always force creation of a stream for SendMessage.
@@ -498,7 +498,7 @@ namespace quic
498
498
  if (override_sni_set_)
499
499
  {
500
500
  // This should only be set before the initial Connect()
501
- server_id_ = QuicServerId(override_sni_, address().port(), false);
501
+ server_id_ = QuicServerId(override_sni_, address().port());
502
502
  }
503
503
  connection_in_progress_ = true;
504
504
  connectionrecheck_ = true;
@@ -616,7 +616,7 @@ namespace quic
616
616
 
617
617
  void Http3Client::openWTSessionInt(absl::string_view path)
618
618
  {
619
- spdy::Http2HeaderBlock headers;
619
+ quiche::HttpHeaderBlock headers;
620
620
  headers[":scheme"] = "https";
621
621
  headers[":authority"] = "localhost";
622
622
  headers[":path"] = path;
@@ -915,7 +915,7 @@ namespace quic
915
915
  return response_headers_complete_;
916
916
  }
917
917
 
918
- const spdy::Http2HeaderBlock *Http3Client::response_headers() const
918
+ const quiche::HttpHeaderBlock *Http3Client::response_headers() const
919
919
  {
920
920
  for (std::pair<QuicStreamId, QuicSpdyClientStream *> stream : open_streams_)
921
921
  {
@@ -928,7 +928,7 @@ namespace quic
928
928
  return &response_headers_;
929
929
  }
930
930
 
931
- const spdy::Http2HeaderBlock &Http3Client::response_trailers() const
931
+ const quiche::HttpHeaderBlock &Http3Client::response_trailers() const
932
932
  {
933
933
  return response_trailers_;
934
934
  }
@@ -964,7 +964,7 @@ namespace quic
964
964
  }
965
965
 
966
966
  void Http3Client::OnCompleteResponse(
967
- QuicStreamId id, const spdy::Http2HeaderBlock &response_headers,
967
+ QuicStreamId id, const quiche::HttpHeaderBlock &response_headers,
968
968
  const absl::string_view &response_body)
969
969
  {
970
970
  // implement
@@ -982,7 +982,7 @@ namespace quic
982
982
  QuicSpdyClientStream *client_stream =
983
983
  static_cast<QuicSpdyClientStream *>(stream);
984
984
 
985
- const Http2HeaderBlock &response_headers = client_stream->response_headers();
985
+ const HttpHeaderBlock &response_headers = client_stream->response_headers();
986
986
 
987
987
  OnCompleteResponse(stream->id(), response_headers, client_stream->data());
988
988
 
@@ -999,7 +999,7 @@ namespace quic
999
999
  QUIC_LOG(ERROR) << "Invalid :status response header: " << status->second;
1000
1000
  }
1001
1001
  latest_response_headers_ = response_headers.DebugString();
1002
- for (const Http2HeaderBlock &headers :
1002
+ for (const HttpHeaderBlock &headers :
1003
1003
  client_stream->preliminary_headers())
1004
1004
  {
1005
1005
  absl::StrAppend(&preliminary_response_headers_, headers.DebugString());
@@ -1044,7 +1044,7 @@ namespace quic
1044
1044
  }
1045
1045
 
1046
1046
  Http3Client::Http3ClientDataToResend::Http3ClientDataToResend(
1047
- std::unique_ptr<spdy::Http2HeaderBlock> headers, absl::string_view body,
1047
+ std::unique_ptr<quiche::HttpHeaderBlock> headers, absl::string_view body,
1048
1048
  bool fin, Http3Client *client)
1049
1049
  : headers_(std::move(headers)), body_(body), fin_(fin),
1050
1050
  client_(client) {}
@@ -1071,8 +1071,8 @@ namespace quic
1071
1071
  Http3Client::PerStreamState::PerStreamState(
1072
1072
  QuicRstStreamErrorCode stream_error, bool response_complete,
1073
1073
  bool response_headers_complete,
1074
- const spdy::Http2HeaderBlock &response_headers,
1075
- const absl::string_view response, const spdy::Http2HeaderBlock &response_trailers,
1074
+ const quiche::HttpHeaderBlock &response_headers,
1075
+ const absl::string_view response, const quiche::HttpHeaderBlock &response_trailers,
1076
1076
  uint64_t bytes_read, uint64_t bytes_written, int64_t response_body_size)
1077
1077
  : stream_error(stream_error),
1078
1078
  response_complete(response_complete),
@@ -1087,7 +1087,7 @@ namespace quic
1087
1087
  Http3Client::PerStreamState::~PerStreamState() = default;
1088
1088
 
1089
1089
  bool Http3Client::PopulateHeaderBlockFromUrl(
1090
- const std::string &uri, spdy::Http2HeaderBlock *headers)
1090
+ const std::string &uri, quiche::HttpHeaderBlock *headers)
1091
1091
  {
1092
1092
  std::string url;
1093
1093
  if (absl::StartsWith(uri, "https://") || absl::StartsWith(uri, "http://"))
package/src/http3client.h CHANGED
@@ -157,12 +157,12 @@ namespace quic
157
157
 
158
158
  // Sends a request containing |headers| and |body| and returns the number of
159
159
  // bytes sent (the size of the serialized request headers and body).
160
- void SendMessageAsync(const spdy::Http2HeaderBlock &headers,
160
+ void SendMessageAsync(const quiche::HttpHeaderBlock &headers,
161
161
  absl::string_view body);
162
162
  // Sends a request containing |headers| and |body| with the fin bit set to
163
163
  // |fin| and returns the number of bytes sent (the size of the serialized
164
164
  // request headers and body).
165
- void SendMessageAsync(const spdy::Http2HeaderBlock &headers,
165
+ void SendMessageAsync(const quiche::HttpHeaderBlock &headers,
166
166
  absl::string_view body, bool fin);
167
167
 
168
168
  void SendConnectivityProbing();
@@ -193,13 +193,13 @@ namespace quic
193
193
  // is received. 2) returns state of the oldest active stream which have
194
194
  // received partial response (if any).
195
195
  // Group 1.
196
- const spdy::Http2HeaderBlock &response_trailers() const;
196
+ const quiche::HttpHeaderBlock &response_trailers() const;
197
197
  bool response_complete() const;
198
198
  int64_t response_body_size() const;
199
199
  const std::string &response_body() const;
200
200
  // Group 2.
201
201
  bool response_headers_complete() const;
202
- const spdy::Http2HeaderBlock *response_headers() const;
202
+ const quiche::HttpHeaderBlock *response_headers() const;
203
203
  int64_t response_size() const;
204
204
  size_t bytes_read() const;
205
205
  size_t bytes_written() const;
@@ -214,7 +214,7 @@ namespace quic
214
214
 
215
215
  // QuicSpdyClientBase::Reponselistener
216
216
  void OnCompleteResponse(
217
- QuicStreamId id, const spdy::Http2HeaderBlock &response_headers,
217
+ QuicStreamId id, const quiche::HttpHeaderBlock &response_headers,
218
218
  const absl::string_view &response_body);
219
219
 
220
220
  // Returns nullptr if the maximum number of streams have already been created.
@@ -226,7 +226,7 @@ namespace quic
226
226
  // stores the request in case it needs to be resent. If |headers| is
227
227
  // null, only the body will be sent on the stream.
228
228
  void GetOrCreateStreamAndSendRequest(
229
- const spdy::Http2HeaderBlock *headers, absl::string_view body, bool fin);
229
+ const quiche::HttpHeaderBlock *headers, absl::string_view body, bool fin);
230
230
 
231
231
  QuicRstStreamErrorCode stream_error() { return stream_error_; }
232
232
  QuicErrorCode connection_error() const;
@@ -263,7 +263,7 @@ namespace quic
263
263
  // request. If |uri| is a relative URL, the QuicServerId will be
264
264
  // use to specify the authority.
265
265
  bool PopulateHeaderBlockFromUrl(const std::string &uri,
266
- spdy::Http2HeaderBlock *headers);
266
+ quiche::HttpHeaderBlock *headers);
267
267
 
268
268
  QuicSpdyClientStream *latest_created_stream()
269
269
  {
@@ -291,7 +291,7 @@ namespace quic
291
291
  {
292
292
  public:
293
293
  Http3ClientDataToResend(
294
- std::unique_ptr<spdy::Http2HeaderBlock> headers, absl::string_view body,
294
+ std::unique_ptr<quiche::HttpHeaderBlock> headers, absl::string_view body,
295
295
  bool fin, Http3Client *client);
296
296
 
297
297
  ~Http3ClientDataToResend();
@@ -299,7 +299,7 @@ namespace quic
299
299
  void Resend();
300
300
 
301
301
  protected:
302
- std::unique_ptr<spdy::Http2HeaderBlock> headers_;
302
+ std::unique_ptr<quiche::HttpHeaderBlock> headers_;
303
303
  absl::string_view body_;
304
304
  bool fin_;
305
305
  Http3Client *client_;
@@ -311,9 +311,9 @@ namespace quic
311
311
  PerStreamState(const PerStreamState &other);
312
312
  PerStreamState(QuicRstStreamErrorCode stream_error, bool response_complete,
313
313
  bool response_headers_complete,
314
- const spdy::Http2HeaderBlock &response_headers,
314
+ const quiche::HttpHeaderBlock &response_headers,
315
315
  const absl::string_view response,
316
- const spdy::Http2HeaderBlock &response_trailers,
316
+ const quiche::HttpHeaderBlock &response_trailers,
317
317
  uint64_t bytes_read, uint64_t bytes_written,
318
318
  int64_t response_body_size);
319
319
  ~PerStreamState();
@@ -321,9 +321,9 @@ namespace quic
321
321
  QuicRstStreamErrorCode stream_error;
322
322
  bool response_complete;
323
323
  bool response_headers_complete;
324
- spdy::Http2HeaderBlock response_headers;
324
+ quiche::HttpHeaderBlock response_headers;
325
325
  std::string response;
326
- spdy::Http2HeaderBlock response_trailers;
326
+ quiche::HttpHeaderBlock response_trailers;
327
327
  uint64_t bytes_read;
328
328
  uint64_t bytes_written;
329
329
  int64_t response_body_size;
@@ -381,10 +381,10 @@ namespace quic
381
381
 
382
382
  bool response_complete_;
383
383
  bool response_headers_complete_;
384
- mutable spdy::Http2HeaderBlock response_headers_;
384
+ mutable quiche::HttpHeaderBlock response_headers_;
385
385
 
386
386
  // Parsed response trailers (if present), copied from the stream in OnClose.
387
- spdy::Http2HeaderBlock response_trailers_;
387
+ quiche::HttpHeaderBlock response_trailers_;
388
388
 
389
389
  QuicStreamPriority priority_;
390
390
  std::string response_;
@@ -504,7 +504,7 @@ namespace quic
504
504
  // preliminary 100 Continue HTTP/2 headers from most recent response, if any.
505
505
  std::string preliminary_response_headers_;
506
506
  // HTTP/2 headers from most recent response.
507
- spdy::Http2HeaderBlock latest_response_header_block_;
507
+ quiche::HttpHeaderBlock latest_response_header_block_;
508
508
  // Body of most recent response.
509
509
  std::string latest_response_body_;
510
510
  // HTTP/2 trailers from most recent response.
@@ -47,13 +47,13 @@ namespace quic
47
47
  }
48
48
 
49
49
  void set_on_interim_headers(
50
- std::function<void(const spdy::Http2HeaderBlock &)> on_interim_headers)
50
+ std::function<void(const quiche::HttpHeaderBlock &)> on_interim_headers)
51
51
  {
52
52
  on_interim_headers_ = std::move(on_interim_headers);
53
53
  }
54
54
 
55
55
  private:
56
- std::function<void(const spdy::Http2HeaderBlock &)> on_interim_headers_;
56
+ std::function<void(const quiche::HttpHeaderBlock &)> on_interim_headers_;
57
57
  const bool drop_response_body_;
58
58
  const bool enable_web_transport_;
59
59
  absl::flat_hash_map<QuicStreamId, webtransport::SessionVisitor *> svisitors_;
@@ -24,7 +24,7 @@ class Http3ClientStream : public QuicSpdyClientStream {
24
24
  void OnBodyAvailable() override;
25
25
 
26
26
  void set_on_interim_headers(
27
- std::function<void(const spdy::Http2HeaderBlock&)> on_interim_headers) {
27
+ std::function<void(const quiche::HttpHeaderBlock&)> on_interim_headers) {
28
28
  on_interim_headers_ = std::move(on_interim_headers);
29
29
  }
30
30
 
@@ -33,7 +33,7 @@ class Http3ClientStream : public QuicSpdyClientStream {
33
33
 
34
34
 
35
35
  private:
36
- std::function<void(const spdy::Http2HeaderBlock&)> on_interim_headers_;
36
+ std::function<void(const quiche::HttpHeaderBlock&)> on_interim_headers_;
37
37
  const bool drop_response_body_;
38
38
  };
39
39
 
@@ -426,7 +426,7 @@ namespace quic
426
426
  .Call(objVal, {retObj});
427
427
  }
428
428
 
429
- void Http3ServerJS::processNewSessionRequest(WebTransportSession *session, const spdy::Http2HeaderBlock &reqhead, WebTransportRespPromisePtr promise)
429
+ void Http3ServerJS::processNewSessionRequest(WebTransportSession *session, const quiche::HttpHeaderBlock &reqhead, WebTransportRespPromisePtr promise)
430
430
  {
431
431
  Napi::HandleScope scope(Env());
432
432
 
package/src/http3server.h CHANGED
@@ -85,7 +85,7 @@ namespace quic
85
85
  }
86
86
 
87
87
  void processNewSession(Http3WTSession *session, const std::string &path, Napi::Reference<Napi::Value> *header, Napi::Reference<Napi::Value> *userData);
88
- void processNewSessionRequest(WebTransportSession *session, const spdy::Http2HeaderBlock &reqheadcopy, WebTransportRespPromisePtr promise);
88
+ void processNewSessionRequest(WebTransportSession *session, const quiche::HttpHeaderBlock &reqheadcopy, WebTransportRespPromisePtr promise);
89
89
 
90
90
  protected:
91
91
  std::unique_ptr<Http3Server> server_;
@@ -25,7 +25,7 @@
25
25
  #include "quiche/common/platform/api/quiche_file_utils.h"
26
26
  #include "quiche/common/quiche_text_utils.h"
27
27
 
28
- using spdy::Http2HeaderBlock;
28
+ using quiche::HttpHeaderBlock;
29
29
 
30
30
  namespace quic
31
31
  {
@@ -34,7 +34,7 @@ namespace quic
34
34
  void QuicMemoryCacheBackend::GenerateDynamicResponses() {
35
35
  QuicWriterMutexLock lock(&response_mutex_);
36
36
  // Add a generate bytes response.
37
- spdy::Http2HeaderBlock response_headers;
37
+ quiche::HttpHeaderBlock response_headers;
38
38
  response_headers[":status"] = "200";
39
39
  generate_bytes_response_ = std::make_unique<QuicBackendResponse>();
40
40
  generate_bytes_response_->set_headers(std::move(response_headers));
@@ -45,7 +45,7 @@ namespace quic
45
45
 
46
46
  Http3ServerBackend::WebTransportRespPromisePtr
47
47
  Http3ServerBackend::ProcessWebTransportRequest(
48
- const spdy::Http2HeaderBlock &request_headers,
48
+ const quiche::HttpHeaderBlock &request_headers,
49
49
  WebTransportSession *session)
50
50
  {
51
51
  WebTransportRespPromisePtr promise = std::make_shared<WebTransportRespPromise>();
@@ -15,7 +15,7 @@
15
15
 
16
16
  #include "quiche/quic/core/quic_types.h"
17
17
  #include "quiche/quic/core/web_transport_interface.h"
18
- #include "quiche/spdy/core/http2_header_block.h"
18
+ #include "quiche/common/http/http_header_block.h"
19
19
 
20
20
  namespace quic
21
21
  {
@@ -62,7 +62,7 @@ namespace quic
62
62
  public:
63
63
  struct WebTransportResponse
64
64
  {
65
- spdy::Http2HeaderBlock response_headers;
65
+ quiche::HttpHeaderBlock response_headers;
66
66
  std::unique_ptr<WebTransportVisitor> visitor;
67
67
  };
68
68
 
@@ -77,7 +77,7 @@ namespace quic
77
77
  void setJSHandler(bool on) { jshandlerequesthandler_ = on; }
78
78
 
79
79
  WebTransportRespPromisePtr ProcessWebTransportRequest(
80
- const spdy::Http2HeaderBlock & /*request_headers*/,
80
+ const quiche::HttpHeaderBlock & /*request_headers*/,
81
81
  WebTransportSession * /*session*/);
82
82
  bool SupportsWebTransport() { return true; }
83
83
  bool UsesDatagramContexts() { return true; }
@@ -27,7 +27,7 @@
27
27
  #include "src/http3serversession.h"
28
28
  #include "quiche/spdy/core/spdy_protocol.h"
29
29
 
30
- using spdy::Http2HeaderBlock;
30
+ using quiche::HttpHeaderBlock;
31
31
 
32
32
  namespace quic
33
33
  {
@@ -279,7 +279,7 @@ namespace quic
279
279
  std::string request_url = request_headers_[":authority"].as_string() +
280
280
  request_headers_[":path"].as_string();
281
281
  int response_code;
282
- const Http2HeaderBlock &response_headers = response->headers();
282
+ const HttpHeaderBlock &response_headers = response->headers();
283
283
  if (!ParseHeaderStatusCode(response_headers, &response_code))
284
284
  {
285
285
  auto status = response_headers.find(":status");
@@ -317,7 +317,7 @@ namespace quic
317
317
  SendNotFoundResponse();
318
318
  return;
319
319
  }
320
- Http2HeaderBlock headers = response->headers().Clone();
320
+ HttpHeaderBlock headers = response->headers().Clone();
321
321
  headers["content-length"] = absl::StrCat(generate_bytes_length_);
322
322
 
323
323
  WriteHeaders(std::move(headers), false, nullptr);
@@ -356,7 +356,7 @@ namespace quic
356
356
  void Http3ServerStream::SendNotFoundResponse()
357
357
  {
358
358
  QUIC_DVLOG(1) << "Stream " << id() << " sending not found response.";
359
- Http2HeaderBlock headers;
359
+ HttpHeaderBlock headers;
360
360
  headers[":status"] = "404";
361
361
  headers["content-length"] = absl::StrCat(strlen(kNotFoundResponseBody));
362
362
  SendHeadersAndBody(std::move(headers), kNotFoundResponseBody);
@@ -374,7 +374,7 @@ namespace quic
374
374
  {
375
375
  StopReading();
376
376
  }
377
- Http2HeaderBlock headers;
377
+ HttpHeaderBlock headers;
378
378
  if (resp_code <= 0)
379
379
  {
380
380
  headers[":status"] = "500";
@@ -388,7 +388,7 @@ namespace quic
388
388
  }
389
389
 
390
390
  void Http3ServerStream::SendIncompleteResponse(
391
- Http2HeaderBlock response_headers,
391
+ HttpHeaderBlock response_headers,
392
392
  absl::string_view body)
393
393
  {
394
394
  QUIC_DLOG(INFO) << "Stream " << id() << " writing headers (fin = false) : "
@@ -406,17 +406,17 @@ namespace quic
406
406
  }
407
407
 
408
408
  void Http3ServerStream::SendHeadersAndBody(
409
- Http2HeaderBlock response_headers,
409
+ HttpHeaderBlock response_headers,
410
410
  absl::string_view body)
411
411
  {
412
412
  SendHeadersAndBodyAndTrailers(std::move(response_headers), body,
413
- Http2HeaderBlock());
413
+ HttpHeaderBlock());
414
414
  }
415
415
 
416
416
  void Http3ServerStream::SendHeadersAndBodyAndTrailers(
417
- Http2HeaderBlock response_headers,
417
+ HttpHeaderBlock response_headers,
418
418
  absl::string_view body,
419
- Http2HeaderBlock response_trailers)
419
+ HttpHeaderBlock response_trailers)
420
420
  {
421
421
  // Send the headers, with a FIN if there's nothing else to send.
422
422
  bool send_fin = (body.empty() && response_trailers.empty());
@@ -16,7 +16,7 @@
16
16
  #include "quiche/quic/core/quic_packets.h"
17
17
  #include "src/http3serverbackend.h"
18
18
  #include "src/http3backendresponse.h"
19
- #include "quiche/spdy/core/spdy_framer.h"
19
+ #include "quiche/http2/core/spdy_framer.h"
20
20
 
21
21
  namespace quic
22
22
  {
@@ -78,16 +78,16 @@ namespace quic
78
78
  void SendNotFoundResponse();
79
79
 
80
80
  // Sends the response header and body, but not the fin.
81
- void SendIncompleteResponse(spdy::Http2HeaderBlock response_headers,
81
+ void SendIncompleteResponse(quiche::HttpHeaderBlock response_headers,
82
82
  absl::string_view body);
83
83
 
84
- void SendHeadersAndBody(spdy::Http2HeaderBlock response_headers,
84
+ void SendHeadersAndBody(quiche::HttpHeaderBlock response_headers,
85
85
  absl::string_view body);
86
- void SendHeadersAndBodyAndTrailers(spdy::Http2HeaderBlock response_headers,
86
+ void SendHeadersAndBodyAndTrailers(quiche::HttpHeaderBlock response_headers,
87
87
  absl::string_view body,
88
- spdy::Http2HeaderBlock response_trailers);
88
+ quiche::HttpHeaderBlock response_trailers);
89
89
 
90
- spdy::Http2HeaderBlock *request_headers() { return &request_headers_; }
90
+ quiche::HttpHeaderBlock *request_headers() { return &request_headers_; }
91
91
 
92
92
  const std::string &body() { return body_; }
93
93
 
@@ -95,7 +95,7 @@ namespace quic
95
95
  void WriteGeneratedBytes();
96
96
 
97
97
  // The parsed headers received from the client.
98
- spdy::Http2HeaderBlock request_headers_;
98
+ quiche::HttpHeaderBlock request_headers_;
99
99
  int64_t content_length_;
100
100
  std::string body_;
101
101
  // promises not fullfilled from js side or c++ side
@@ -14,6 +14,7 @@
14
14
  #include "src/http3wtsessionvisitor.h"
15
15
  #include "src/napialarmfactory.h"
16
16
  #include "quiche/common/platform/api/quiche_command_line_flags.h"
17
+ #include "quiche/common/platform/api/quiche_flags.h"
17
18
 
18
19
  #include "absl/log/initialize.h"
19
20
  #include "absl/strings/string_view.h"
@@ -58,6 +59,7 @@ namespace quic
58
59
  {
59
60
  quiche_cmd_line_char.push_back((*cur).c_str());
60
61
  }
62
+ SetQuicheReloadableFlag(quic_deliver_stop_sending_to_zombie_streams, true); // enable patch
61
63
  if (!hasSetLogging)
62
64
  {
63
65
  quiche::QuicheParseCommandLineFlags("No use instruction.", quiche_cmd_line.size(), &(*quiche_cmd_line_char.begin()));