1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
//! Macros to help generate code for all suites/groups/tests of the httpwg crate
// This file is automatically @generated by httpwg-gen
// It is not intended for manual editing
/// This generates a module tree with some #[test] functions.
/// The `$body` argument is pasted inside those unit test, and
/// in that scope, `test` is the `httpwg` function you can use
/// to run the test (that takes a `mut conn: Conn<IO>`)
#[macro_export]
macro_rules! tests {
($body: tt) => {
/// RFC 9113 describes an optimized expression of the
/// semantics of the Hypertext Transfer Protocol (HTTP), referred to as
/// HTTP version 2 (HTTP/2).
///
/// HTTP/2 enables a more efficient use of network resources and a reduced
/// latency by introducing field compression and allowing multiple concurrent
/// exchanges on the same connection.
///
/// This document obsoletes RFCs 7540 and 8740.
///
/// cf. <https://httpwg.org/specs/rfc9113.html>
#[cfg(test)]
mod rfc9113 {
use ::httpwg::rfc9113 as __suite;
/// Section 3: Starting HTTP/2
mod _3_starting_http2 {
use super::__suite::_3_starting_http2 as __group;
/// The server connection preface consists of a potentially empty
/// SETTINGS frame (Section 6.5) that MUST be the first frame
/// the server sends in the HTTP/2 connection.
#[test]
fn sends_client_connection_preface() {
use __group::sends_client_connection_preface as test;
$body
}
/// Clients and servers MUST treat an invalid connection preface as
/// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_invalid_connection_preface() {
use __group::sends_invalid_connection_preface as test;
$body
}
}
/// Section 4: HTTP Frames
mod _4_http_frames {
use super::__suite::_4_http_frames as __group;
/// Implementations MUST ignore and discard frames of unknown types.
#[test]
fn sends_frame_with_unknown_type() {
use __group::sends_frame_with_unknown_type as test;
$body
}
/// Unused flags MUST be ignored on receipt and MUST be left
/// unset (0x00) when sending.
#[test]
fn sends_frame_with_unused_flags() {
use __group::sends_frame_with_unused_flags as test;
$body
}
/// Reserved: A reserved 1-bit field. The semantics of this bit are
/// undefined, and the bit MUST remain unset (0x00) when sending and
/// MUST be ignored when receiving.
#[test]
fn sends_frame_with_reserved_bit_set() {
use __group::sends_frame_with_reserved_bit_set as test;
$body
}
#[test]
fn data_frame_with_max_length() {
use __group::data_frame_with_max_length as test;
$body
}
/// An endpoint MUST send an error code of FRAME_SIZE_ERROR if a frame
/// exceeds the size defined in SETTINGS_MAX_FRAME_SIZE, exceeds any
/// limit defined for the frame type, or is too small to contain mandatory frame
/// data
#[test]
fn frame_exceeding_max_size() {
use __group::frame_exceeding_max_size as test;
$body
}
/// A frame size error in a frame that could alter the state of
/// the entire connection MUST be treated as a connection error
/// (Section 5.4.1); this includes any frame carrying a field block
/// (Section 4.3) (that is, HEADERS, PUSH_PROMISE, and CONTINUATION),
/// a SETTINGS frame, and any frame with a stream identifier of 0.
#[test]
fn large_headers_frame_exceeding_max_size() {
use __group::large_headers_frame_exceeding_max_size as test;
$body
}
/// A decoding error in a header block MUST be treated as a connection error
/// (Section 5.4.1) of type COMPRESSION_ERROR.
#[test]
fn invalid_header_block_fragment() {
use __group::invalid_header_block_fragment as test;
$body
}
/// Each header block is processed as a discrete unit. Header blocks
/// MUST be transmitted as a contiguous sequence of frames, with no
/// interleaved frames of any other type or from any other stream.
#[test]
fn priority_frame_while_sending_headers() {
use __group::priority_frame_while_sending_headers as test;
$body
}
/// Each header block is processed as a discrete unit. Header blocks
/// MUST be transmitted as a contiguous sequence of frames, with no
/// interleaved frames of any other type or from any other stream.
#[test]
fn headers_frame_to_another_stream() {
use __group::headers_frame_to_another_stream as test;
$body
}
}
/// Section 5: Streams and Multiplexing
mod _5_streams_and_multiplexing {
use super::__suite::_5_streams_and_multiplexing as __group;
/// idle:
/// Receiving any frame other than HEADERS or PRIORITY on a stream
/// in this state MUST be treated as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn idle_sends_data_frame() {
use __group::idle_sends_data_frame as test;
$body
}
/// idle:
/// Receiving any frame other than HEADERS or PRIORITY on a stream
/// in this state MUST be treated as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn idle_sends_rst_stream_frame() {
use __group::idle_sends_rst_stream_frame as test;
$body
}
/// idle:
/// Receiving any frame other than HEADERS or PRIORITY on a stream
/// in this state MUST be treated as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn idle_sends_window_update_frame() {
use __group::idle_sends_window_update_frame as test;
$body
}
/// idle:
/// Receiving any frame other than HEADERS or PRIORITY on a stream
/// in this state MUST be treated as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn idle_sends_continuation_frame() {
use __group::idle_sends_continuation_frame as test;
$body
}
/// half-closed (remote):
/// If an endpoint receives additional frames, other than
/// WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in
/// this state, it MUST respond with a stream error (Section 5.4.2)
/// of type STREAM_CLOSED.
#[test]
fn half_closed_remote_sends_data_frame() {
use __group::half_closed_remote_sends_data_frame as test;
$body
}
/// half-closed (remote):
/// If an endpoint receives additional frames, other than
/// WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in
/// this state, it MUST respond with a stream error (Section 5.4.2)
/// of type STREAM_CLOSED.
#[test]
fn half_closed_remote_sends_headers_frame() {
use __group::half_closed_remote_sends_headers_frame as test;
$body
}
/// half-closed (remote):
/// If an endpoint receives additional frames, other than
/// WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in
/// this state, it MUST respond with a stream error (Section 5.4.2)
/// of type STREAM_CLOSED.
#[test]
fn half_closed_remote_sends_continuation_frame() {
use __group::half_closed_remote_sends_continuation_frame as test;
$body
}
/// closed:
/// An endpoint that receives any frame other than PRIORITY after
/// receiving a RST_STREAM MUST treat that as a stream error
/// (Section 5.4.2) of type STREAM_CLOSED.
#[test]
fn closed_sends_data_frame_after_rst_stream() {
use __group::closed_sends_data_frame_after_rst_stream as test;
$body
}
/// closed:
/// An endpoint that receives any frame other than PRIORITY after
/// receiving a RST_STREAM MUST treat that as a stream error
/// (Section 5.4.2) of type STREAM_CLOSED.
#[test]
fn closed_sends_headers_frame_after_rst_stream() {
use __group::closed_sends_headers_frame_after_rst_stream as test;
$body
}
/// closed:
/// An endpoint that receives any frame other than PRIORITY after
/// receiving a RST_STREAM MUST treat that as a stream error
/// (Section 5.4.2) of type STREAM_CLOSED.
#[test]
fn closed_sends_continuation_frame_after_rst_stream() {
use __group::closed_sends_continuation_frame_after_rst_stream as test;
$body
}
/// closed:
/// An endpoint that receives any frames after receiving a frame
/// with the END_STREAM flag set MUST treat that as a connection
/// error (Section 6.4.1) of type STREAM_CLOSED.
#[test]
fn closed_sends_data_frame() {
use __group::closed_sends_data_frame as test;
$body
}
/// closed:
/// An endpoint that receives any frames after receiving a frame
/// with the END_STREAM flag set MUST treat that as a connection
/// error (Section 6.4.1) of type STREAM_CLOSED.
#[test]
fn closed_sends_headers_frame() {
use __group::closed_sends_headers_frame as test;
$body
}
/// closed:
/// An endpoint that receives any frames after receiving a frame
/// with the END_STREAM flag set MUST treat that as a connection
/// error (Section 6.4.1) of type STREAM_CLOSED.
#[test]
fn closed_sends_continuation_frame() {
use __group::closed_sends_continuation_frame as test;
$body
}
/// An endpoint that receives an unexpected stream identifier
/// MUST respond with a connection error (Section 5.4.1) of
/// type PROTOCOL_ERROR.
#[test]
fn sends_even_numbered_stream_identifier() {
use __group::sends_even_numbered_stream_identifier as test;
$body
}
/// An endpoint that receives an unexpected stream identifier
/// MUST respond with a connection error (Section 5.4.1) of
/// type PROTOCOL_ERROR.
#[test]
fn sends_smaller_stream_identifier() {
use __group::sends_smaller_stream_identifier as test;
$body
}
#[test]
fn exceeds_concurrent_stream_limit() {
use __group::exceeds_concurrent_stream_limit as test;
$body
}
/// After sending the GOAWAY frame for an error condition,
/// the endpoint MUST close the TCP connection.
#[test]
fn invalid_ping_frame_for_connection_close() {
use __group::invalid_ping_frame_for_connection_close as test;
$body
}
#[test]
fn test_invalid_ping_frame_for_goaway() {
use __group::test_invalid_ping_frame_for_goaway as test;
$body
}
/// Extension frames that appear in the middle of a header block
/// (Section 4.3) are not permitted; these MUST be treated as
/// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn unknown_extension_frame_in_header_block() {
use __group::unknown_extension_frame_in_header_block as test;
$body
}
}
/// Section 6: Frame Definitions
mod _6_frame_definitions {
use super::__suite::_6_frame_definitions as __group;
/// DATA frames MUST be associated with a stream. If a DATA frame is
/// received whose stream identifier field is 0x0, the recipient
/// MUST respond with a connection error (Section 5.4.1) of type
/// PROTOCOL_ERROR.
#[test]
fn sends_data_frame_with_zero_stream_id() {
use __group::sends_data_frame_with_zero_stream_id as test;
$body
}
/// If a DATA frame is received whose stream is not in "open" or
/// "half-closed (local)" state, the recipient MUST respond with
/// a stream error (Section 5.4.2) of type STREAM_CLOSED.
///
/// Note: This test case is duplicated with 5.1.
#[test]
fn sends_data_frame_on_invalid_stream_state() {
use __group::sends_data_frame_on_invalid_stream_state as test;
$body
}
/// If the length of the padding is the length of the frame payload
/// or greater, the recipient MUST treat this as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_data_frame_with_invalid_pad_length() {
use __group::sends_data_frame_with_invalid_pad_length as test;
$body
}
/// HEADERS frames MUST be associated with a stream. If a HEADERS
/// frame is received whose stream identifier field is 0x0, the
/// recipient MUST respond with a connection error (Section 5.4.1)
/// of type PROTOCOL_ERROR.
#[test]
fn sends_headers_frame_with_zero_stream_id() {
use __group::sends_headers_frame_with_zero_stream_id as test;
$body
}
/// The HEADERS frame can include padding. Padding fields and flags
/// are identical to those defined for DATA frames (Section 6.1).
/// Padding that exceeds the size remaining for the header block
/// fragment MUST be treated as a PROTOCOL_ERROR.
#[test]
fn sends_headers_frame_with_invalid_pad_length() {
use __group::sends_headers_frame_with_invalid_pad_length as test;
$body
}
/// The PRIORITY frame always identifies a stream. If a PRIORITY
/// frame is received with a stream identifier of 0x0, the recipient
/// MUST respond with a connection error (Section 5.4.1) of type
/// PROTOCOL_ERROR.
#[test]
fn sends_priority_frame_with_zero_stream_id() {
use __group::sends_priority_frame_with_zero_stream_id as test;
$body
}
/// A PRIORITY frame with a length other than 5 octets MUST be
/// treated as a stream error (Section 5.4.2) of type
/// FRAME_SIZE_ERROR.
#[test]
fn sends_priority_frame_with_invalid_length() {
use __group::sends_priority_frame_with_invalid_length as test;
$body
}
/// RST_STREAM frames MUST be associated with a stream. If a
/// RST_STREAM frame is received with a stream identifier of 0x0,
/// the recipient MUST treat this as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_rst_stream_frame_with_zero_stream_id() {
use __group::sends_rst_stream_frame_with_zero_stream_id as test;
$body
}
/// RST_STREAM frames MUST NOT be sent for a stream in the "idle"
/// state. If a RST_STREAM frame identifying an idle stream is
/// received, the recipient MUST treat this as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_rst_stream_frame_on_idle_stream() {
use __group::sends_rst_stream_frame_on_idle_stream as test;
$body
}
/// A RST_STREAM frame with a length other than 4 octets MUST be
/// treated as a connection error (Section 5.4.1) of type
/// FRAME_SIZE_ERROR.
#[test]
fn sends_rst_stream_frame_with_invalid_length() {
use __group::sends_rst_stream_frame_with_invalid_length as test;
$body
}
/// ACK (0x1):
/// When set, bit 0 indicates that this frame acknowledges receipt
/// and application of the peer's SETTINGS frame. When this bit is
/// set, the payload of the SETTINGS frame MUST be empty. Receipt of
/// a SETTINGS frame with the ACK flag set and a length field value
/// other than 0 MUST be treated as a connection error (Section 5.4.1)
/// of type FRAME_SIZE_ERROR.
#[test]
fn sends_settings_frame_with_ack_and_payload() {
use __group::sends_settings_frame_with_ack_and_payload as test;
$body
}
/// SETTINGS frames always apply to a connection, never a single
/// stream. The stream identifier for a SETTINGS frame MUST be
/// zero (0x0). If an endpoint receives a SETTINGS frame whose
/// stream identifier field is anything other than 0x0, the
/// endpoint MUST respond with a connection error (Section 5.4.1)
/// of type PROTOCOL_ERROR.
#[test]
fn sends_settings_frame_with_non_zero_stream_id() {
use __group::sends_settings_frame_with_non_zero_stream_id as test;
$body
}
/// The SETTINGS frame affects connection state. A badly formed or
/// incomplete SETTINGS frame MUST be treated as a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
///
/// A SETTINGS frame with a length other than a multiple of 6 octets
/// MUST be treated as a connection error (Section 5.4.1) of type
/// FRAME_SIZE_ERROR.
#[test]
fn sends_settings_frame_with_invalid_length() {
use __group::sends_settings_frame_with_invalid_length as test;
$body
}
/// SETTINGS_ENABLE_PUSH (0x2):
/// The initial value is 1, which indicates that server push is
/// permitted. Any value other than 0 or 1 MUST be treated as a
/// connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_settings_enable_push_with_invalid_value() {
use __group::sends_settings_enable_push_with_invalid_value as test;
$body
}
/// SETTINGS_INITIAL_WINDOW_SIZE (0x4):
/// Values above the maximum flow-control window size of 2^31-1
/// MUST be treated as a connection error (Section 5.4.1) of
/// type FLOW_CONTROL_ERROR.
#[test]
fn sends_settings_initial_window_size_with_invalid_value() {
use __group::sends_settings_initial_window_size_with_invalid_value as test;
$body
}
/// SETTINGS_MAX_FRAME_SIZE (0x5):
/// The initial value is 2^14 (16,384) octets. The value advertised
/// by an endpoint MUST be between this initial value and the
/// maximum allowed frame size (2^24-1 or 16,777,215 octets),
/// inclusive. Values outside this range MUST be treated as a
/// connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_settings_max_frame_size_with_invalid_value_below_initial() {
use __group::sends_settings_max_frame_size_with_invalid_value_below_initial as test;
$body
}
/// SETTINGS_MAX_FRAME_SIZE (0x5):
/// The initial value is 2^14 (16,384) octets. The value advertised
/// by an endpoint MUST be between this initial value and the
/// maximum allowed frame size (2^24-1 or 16,777,215 octets),
/// inclusive. Values outside this range MUST be treated as a
/// connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_settings_max_frame_size_with_invalid_value_above_max() {
use __group::sends_settings_max_frame_size_with_invalid_value_above_max as test;
$body
}
/// An endpoint that receives a SETTINGS frame with any unknown
/// or unsupported identifier MUST ignore that setting.
#[test]
fn sends_settings_frame_with_unknown_identifier() {
use __group::sends_settings_frame_with_unknown_identifier as test;
$body
}
/// The values in the SETTINGS frame MUST be processed in the order
/// they appear, with no other frame processing between values.
#[test]
fn sends_multiple_values_of_settings_initial_window_size() {
use __group::sends_multiple_values_of_settings_initial_window_size as test;
$body
}
/// Once all values have been processed, the recipient MUST
/// immediately emit a SETTINGS frame with the ACK flag set.
#[test]
fn sends_settings_frame_without_ack_flag() {
use __group::sends_settings_frame_without_ack_flag as test;
$body
}
/// Receivers of a PING frame that does not include an ACK flag MUST
/// send a PING frame with the ACK flag set in response, with an
/// identical payload.
#[test]
fn sends_ping_frame() {
use __group::sends_ping_frame as test;
$body
}
/// ACK (0x1):
/// When set, bit 0 indicates that this PING frame is a PING
/// response. An endpoint MUST set this flag in PING responses.
/// An endpoint MUST NOT respond to PING frames containing this
/// flag.
#[test]
fn sends_ping_frame_with_ack() {
use __group::sends_ping_frame_with_ack as test;
$body
}
/// If a PING frame is received with a stream identifier field value
/// other than 0x0, the recipient MUST respond with a connection
/// error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_ping_frame_with_non_zero_stream_id() {
use __group::sends_ping_frame_with_non_zero_stream_id as test;
$body
}
/// Receipt of a PING frame with a length field value other than 8
/// MUST be treated as a connection error (Section 5.4.1) of type
/// FRAME_SIZE_ERROR.
#[test]
fn sends_ping_frame_with_invalid_length() {
use __group::sends_ping_frame_with_invalid_length as test;
$body
}
/// An endpoint MUST treat a GOAWAY frame with a stream identifier
/// other than 0x0 as a connection error (Section 5.4.1) of type
/// PROTOCOL_ERROR.
#[test]
fn sends_goaway_frame_with_non_zero_stream_id() {
use __group::sends_goaway_frame_with_non_zero_stream_id as test;
$body
}
/// A receiver MUST treat the receipt of a WINDOW_UPDATE frame with
/// a flow-control window increment of 0 as a stream error
/// (Section 5.4.2) of type PROTOCOL_ERROR; errors on the connection
/// flow-control window MUST be treated as a connection error
/// (Section 5.4.1).
#[test]
fn sends_window_update_frame_with_zero_increment() {
use __group::sends_window_update_frame_with_zero_increment as test;
$body
}
/// A receiver MUST treat the receipt of a WINDOW_UPDATE frame with
/// a flow-control window increment of 0 as a stream error
/// (Section 5.4.2) of type PROTOCOL_ERROR; errors on the connection
/// flow-control window MUST be treated as a connection error
/// (Section 5.4.1).
#[test]
fn sends_window_update_frame_with_zero_increment_on_stream() {
use __group::sends_window_update_frame_with_zero_increment_on_stream as test;
$body
}
/// A WINDOW_UPDATE frame with a length other than 4 octets MUST
/// be treated as a connection error (Section 5.4.1) of type
/// FRAME_SIZE_ERROR.
#[test]
fn sends_window_update_frame_with_invalid_length() {
use __group::sends_window_update_frame_with_invalid_length as test;
$body
}
/// The sender MUST NOT send a flow-controlled frame with a length
/// that exceeds the space available in either of the flow-control
/// windows advertised by the receiver.
#[test]
fn sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame() {
use __group::sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame as test;
$body
}
/// A sender MUST NOT allow a flow-control window to exceed 2^31-1
/// octets. If a sender receives a WINDOW_UPDATE that causes a
/// flow-control window to exceed this maximum, it MUST terminate
/// either the stream or the connection, as appropriate.
/// For streams, the sender sends a RST_STREAM with an error code
/// of FLOW_CONTROL_ERROR; for the connection, a GOAWAY frame with
/// an error code of FLOW_CONTROL_ERROR is sent.
#[test]
fn sends_multiple_window_update_frames_increasing_flow_control_window_above_max() {
use __group::sends_multiple_window_update_frames_increasing_flow_control_window_above_max as test;
$body
}
/// A sender MUST NOT allow a flow-control window to exceed 2^31-1
/// octets. If a sender receives a WINDOW_UPDATE that causes a
/// flow-control window to exceed this maximum, it MUST terminate
/// either the stream or the connection, as appropriate.
/// For streams, the sender sends a RST_STREAM with an error code
/// of FLOW_CONTROL_ERROR; for the connection, a GOAWAY frame with
/// an error code of FLOW_CONTROL_ERROR is sent.
#[test]
fn sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream() {
use __group::sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream as test;
$body
}
/// When the value of SETTINGS_INITIAL_WINDOW_SIZE changes,
/// a receiver MUST adjust the size of all stream flow-control
/// windows that it maintains by the difference between the new
/// value and the old value.
#[test]
fn changes_settings_initial_window_size_after_sending_headers_frame() {
use __group::changes_settings_initial_window_size_after_sending_headers_frame as test;
$body
}
/// A sender MUST track the negative flow-control window and
/// MUST NOT send new flow-controlled frames until it receives
/// WINDOW_UPDATE frames that cause the flow-control window to
/// become positive.
#[test]
fn sends_settings_frame_for_window_size_to_be_negative() {
use __group::sends_settings_frame_for_window_size_to_be_negative as test;
$body
}
/// An endpoint MUST treat a change to SETTINGS_INITIAL_WINDOW_SIZE
/// that causes any flow-control window to exceed the maximum size
/// as a connection error (Section 5.4.1) of type FLOW_CONTROL_ERROR.
#[test]
fn sends_settings_initial_window_size_with_exceeded_max_window_size_value() {
use __group::sends_settings_initial_window_size_with_exceeded_max_window_size_value as test;
$body
}
/// The CONTINUATION frame (type=0x9) is used to continue a sequence
/// of header block fragments (Section 4.3). Any number of
/// CONTINUATION frames can be sent, as long as the preceding frame
/// is on the same stream and is a HEADERS, PUSH_PROMISE,
/// or CONTINUATION frame without the END_HEADERS flag set.
#[test]
fn sends_multiple_continuation_frames_preceded_by_headers_frame() {
use __group::sends_multiple_continuation_frames_preceded_by_headers_frame as test;
$body
}
/// END_HEADERS (0x4):
/// If the END_HEADERS bit is not set, this frame MUST be followed
/// by another CONTINUATION frame. A receiver MUST treat the receipt
/// of any other type of frame or a frame on a different stream as
/// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_continuation_frame_followed_by_non_continuation_frame() {
use __group::sends_continuation_frame_followed_by_non_continuation_frame as test;
$body
}
/// CONTINUATION frames MUST be associated with a stream. If a
/// CONTINUATION frame is received whose stream identifier field is
/// 0x0, the recipient MUST respond with a connection error
/// (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_continuation_frame_with_zero_stream_id() {
use __group::sends_continuation_frame_with_zero_stream_id as test;
$body
}
/// A CONTINUATION frame MUST be preceded by a HEADERS, PUSH_PROMISE
/// or CONTINUATION frame without the END_HEADERS flag set.
/// A recipient that observes violation of this rule MUST respond
/// with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag() {
use __group::sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag as test;
$body
}
/// A CONTINUATION frame MUST be preceded by a HEADERS, PUSH_PROMISE
/// or CONTINUATION frame without the END_HEADERS flag set.
/// A recipient that observes violation of this rule MUST respond
/// with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag() {
use __group::sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag as test;
$body
}
/// A CONTINUATION frame MUST be preceded by a HEADERS, PUSH_PROMISE
/// or CONTINUATION frame without the END_HEADERS flag set.
/// A recipient that observes violation of this rule MUST respond
/// with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
#[test]
fn sends_continuation_frame_preceded_by_data_frame() {
use __group::sends_continuation_frame_preceded_by_data_frame as test;
$body
}
}
/// Section 7: Error Codes
mod _7_error_codes {
use super::__suite::_7_error_codes as __group;
/// Unknown or unsupported error codes MUST NOT trigger any special
/// behavior. These MAY be treated by an implementation as being
/// equivalent to INTERNAL_ERROR.
#[test]
fn sends_goaway_frame_with_unknown_error_code() {
use __group::sends_goaway_frame_with_unknown_error_code as test;
$body
}
/// Unknown or unsupported error codes MUST NOT trigger any special
/// behavior. These MAY be treated by an implementation as being
/// equivalent to INTERNAL_ERROR.
#[test]
fn sends_rst_stream_frame_with_unknown_error_code() {
use __group::sends_rst_stream_frame_with_unknown_error_code as test;
$body
}
}
/// Section 8: Expressing HTTP Semantics in HTTP/2
mod _8_expressing_http_semantics_in_http2 {
use super::__suite::_8_expressing_http_semantics_in_http2 as __group;
#[test]
fn sends_second_headers_frame_without_end_stream() {
use __group::sends_second_headers_frame_without_end_stream as test;
$body
}
#[test]
fn sends_headers_frame_with_incorrect_content_length_single_data_frame() {
use __group::sends_headers_frame_with_incorrect_content_length_single_data_frame as test;
$body
}
#[test]
fn sends_headers_frame_with_incorrect_content_length_multiple_data_frames() {
use __group::sends_headers_frame_with_incorrect_content_length_multiple_data_frames as test;
$body
}
/// A field name MUST NOT contain characters in the ranges 0x00-0x20, 0x41-0x5a,
/// or 0x7f-0xff (all ranges inclusive). This specifically excludes all
/// non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A'
/// to 'Z', ASCII 0x41 to 0x5a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_uppercase_field_name() {
use __group::sends_headers_frame_with_uppercase_field_name as test;
$body
}
/// A field name MUST NOT contain characters in the ranges 0x00-0x20, 0x41-0x5a,
/// or 0x7f-0xff (all ranges inclusive). This specifically excludes all
/// non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A'
/// to 'Z', ASCII 0x41 to 0x5a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_space_in_field_name() {
use __group::sends_headers_frame_with_space_in_field_name as test;
$body
}
/// A field name MUST NOT contain characters in the ranges 0x00-0x20, 0x41-0x5a,
/// or 0x7f-0xff (all ranges inclusive). This specifically excludes all
/// non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A'
/// to 'Z', ASCII 0x41 to 0x5a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_non_visible_ascii() {
use __group::sends_headers_frame_with_non_visible_ascii as test;
$body
}
/// A field name MUST NOT contain characters in the ranges 0x00-0x20, 0x41-0x5a,
/// or 0x7f-0xff (all ranges inclusive). This specifically excludes all
/// non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A'
/// to 'Z', ASCII 0x41 to 0x5a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_del_character() {
use __group::sends_headers_frame_with_del_character as test;
$body
}
/// A field name MUST NOT contain characters in the ranges 0x00-0x20, 0x41-0x5a,
/// or 0x7f-0xff (all ranges inclusive). This specifically excludes all
/// non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A'
/// to 'Z', ASCII 0x41 to 0x5a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_non_ascii_character() {
use __group::sends_headers_frame_with_non_ascii_character as test;
$body
}
/// With the exception of pseudo-header fields (Section 8.3), which have a name
/// that starts with a single colon, field names MUST NOT include a colon (ASCII
/// COLON, 0x3a).
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_colon_in_field_name() {
use __group::sends_headers_frame_with_colon_in_field_name as test;
$body
}
/// A field value MUST NOT contain the zero value (ASCII NUL, 0x00), line feed
/// (ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position.
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_lf_in_field_value() {
use __group::sends_headers_frame_with_lf_in_field_value as test;
$body
}
/// A field value MUST NOT contain the zero value (ASCII NUL, 0x00), line feed
/// (ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position.
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_cr_in_field_value() {
use __group::sends_headers_frame_with_cr_in_field_value as test;
$body
}
/// A field value MUST NOT contain the zero value (ASCII NUL, 0x00), line feed
/// (ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position.
///
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_nul_in_field_value() {
use __group::sends_headers_frame_with_nul_in_field_value as test;
$body
}
/// A field value MUST NOT start or end with an ASCII whitespace character
/// (ASCII SP or HTAB, 0x20 or 0x09).
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_leading_space_in_field_value() {
use __group::sends_headers_frame_with_leading_space_in_field_value as test;
$body
}
/// A field value MUST NOT start or end with an ASCII whitespace character
/// (ASCII SP or HTAB, 0x20 or 0x09).
/// When a request message violates one of these requirements, an implementation
/// SHOULD generate a 400 (Bad Request) status code (see Section 15.5.1 of
/// HTTP), unless a more suitable status code is defined or the status code
/// cannot be sent (e.g., because the error occurs in a trailer field).
#[test]
fn sends_headers_frame_with_trailing_tab_in_field_value() {
use __group::sends_headers_frame_with_trailing_tab_in_field_value as test;
$body
}
/// HTTP/2 does not use the Connection header field (Section 7.6.1 of HTTP) to
/// indicate connection-specific header fields; in this protocol,
/// connection-specific metadata is conveyed by other means. An endpoint MUST
/// NOT generate an HTTP/2 message containing connection-specific header fields.
/// This includes the Connection header field and those listed as having
/// connection-specific semantics in Section 7.6.1 of HTTP (that is,
/// Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message
/// containing connection-specific header fields MUST be treated as malformed
/// (Section 8.1.1).
#[test]
fn sends_headers_frame_with_connection_header() {
use __group::sends_headers_frame_with_connection_header as test;
$body
}
/// HTTP/2 does not use the Connection header field (Section 7.6.1 of HTTP) to
/// indicate connection-specific header fields; in this protocol,
/// connection-specific metadata is conveyed by other means. An endpoint MUST
/// NOT generate an HTTP/2 message containing connection-specific header fields.
///
/// This includes the Connection header field and those listed as having
/// connection-specific semantics in Section 7.6.1 of HTTP (that is,
/// Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message
/// containing connection-specific header fields MUST be treated as malformed
/// (Section 8.1.1).
#[test]
fn sends_headers_frame_with_proxy_connection_header() {
use __group::sends_headers_frame_with_proxy_connection_header as test;
$body
}
/// HTTP/2 does not use the Connection header field (Section 7.6.1 of HTTP) to
/// indicate connection-specific header fields; in this protocol,
/// connection-specific metadata is conveyed by other means. An endpoint MUST
/// NOT generate an HTTP/2 message containing connection-specific header fields.
///
/// This includes the Connection header field and those listed as having
/// connection-specific semantics in Section 7.6.1 of HTTP (that is,
/// Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message
/// containing connection-specific header fields MUST be treated as malformed
/// (Section 8.1.1).
#[test]
fn sends_headers_frame_with_keep_alive_header() {
use __group::sends_headers_frame_with_keep_alive_header as test;
$body
}
/// HTTP/2 does not use the Connection header field (Section 7.6.1 of HTTP) to
/// indicate connection-specific header fields; in this protocol,
/// connection-specific metadata is conveyed by other means. An endpoint MUST
/// NOT generate an HTTP/2 message containing connection-specific header fields.
///
/// This includes the Connection header field and those listed as having
/// connection-specific semantics in Section 7.6.1 of HTTP (that is,
/// Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message
/// containing connection-specific header fields MUST be treated as malformed
/// (Section 8.1.1).
#[test]
fn sends_headers_frame_with_transfer_encoding_header() {
use __group::sends_headers_frame_with_transfer_encoding_header as test;
$body
}
/// HTTP/2 does not use the Connection header field (Section 7.6.1 of HTTP) to
/// indicate connection-specific header fields; in this protocol,
/// connection-specific metadata is conveyed by other means. An endpoint MUST
/// NOT generate an HTTP/2 message containing connection-specific header fields.
///
/// This includes the Connection header field and those listed as having
/// connection-specific semantics in Section 7.6.1 of HTTP (that is,
/// Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message
/// containing connection-specific header fields MUST be treated as malformed
/// (Section 8.1.1).
#[test]
fn sends_headers_frame_with_upgrade_header() {
use __group::sends_headers_frame_with_upgrade_header as test;
$body
}
/// The only exception to this is the TE header field, which MAY be present in
/// an HTTP/2 request; when it is, it MUST NOT contain any value other than
/// "trailers".
#[test]
fn sends_headers_frame_with_te_trailers() {
use __group::sends_headers_frame_with_te_trailers as test;
$body
}
/// The only exception to this is the TE header field, which MAY be present in
/// an HTTP/2 request; when it is, it MUST NOT contain any value other than
/// "trailers".
#[test]
fn sends_headers_frame_with_te_not_trailers() {
use __group::sends_headers_frame_with_te_not_trailers as test;
$body
}
/// [...] pseudo-header fields defined for responses MUST NOT appear in requests
/// [...] Endpoints MUST treat a request or response that contains undefined or
/// invalid pseudo-header fields as malformed (Section 8.1.1).
#[test]
fn sends_headers_frame_with_response_pseudo_header() {
use __group::sends_headers_frame_with_response_pseudo_header as test;
$body
}
/// [...] Pseudo-header fields MUST NOT appear in a trailer section. Endpoints
/// MUST treat a request or response that contains undefined or invalid
/// pseudo-header fields as malformed (Section 8.1.1).
#[test]
fn sends_headers_frame_with_pseudo_header_in_trailer() {
use __group::sends_headers_frame_with_pseudo_header_in_trailer as test;
$body
}
/// The same pseudo-header field name MUST NOT appear more than once in a field
/// block. A field block for an HTTP request or response that contains a
/// repeated pseudo-header field name MUST be treated as malformed (Section
/// 8.1.1).
#[test]
fn sends_headers_frame_with_duplicate_pseudo_headers() {
use __group::sends_headers_frame_with_duplicate_pseudo_headers as test;
$body
}
/// A server SHOULD treat a request as malformed if it contains a Host header
/// field that identifies an entity that differs from the entity in the
/// ":authority" pseudo-header field. The values of fields need to be normalized
/// to compare them (see Section 6.2 of RFC3986). An origin server can apply
/// any normalization method, whereas other servers MUST perform scheme-based
/// normalization (see Section 6.2.3 of RFC3986) of the two fields.
///
/// cf. <https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2.3>
#[test]
fn sends_headers_frame_with_mismatched_host_authority() {
use __group::sends_headers_frame_with_mismatched_host_authority as test;
$body
}
/// This pseudo-header field MUST NOT be empty for "http" or "https" URIs;
/// "http" or "https" URIs that do not contain a path component MUST include a
/// value of '/'. The exceptions to this rule are:
///
/// an OPTIONS request for an "http" or "https" URI that does not include a path
/// component; these MUST include a ":path" pseudo-header field with a value of
/// '*' (see Section 7.1 of HTTP). CONNECT requests (Section 8.5), where the
/// ":path" pseudo-header field is omitted.
#[test]
fn sends_headers_frame_with_empty_path_component() {
use __group::sends_headers_frame_with_empty_path_component as test;
$body
}
/// All HTTP/2 requests MUST include exactly one valid value for the ":method",
/// ":scheme", and ":path" pseudo-header fields, unless they are CONNECT
/// requests (Section 8.5). An HTTP request that omits mandatory pseudo-header
/// fields is malformed (Section 8.1.1).
#[test]
fn sends_headers_frame_without_method() {
use __group::sends_headers_frame_without_method as test;
$body
}
#[test]
fn sends_headers_frame_without_scheme() {
use __group::sends_headers_frame_without_scheme as test;
$body
}
#[test]
fn sends_headers_frame_without_path() {
use __group::sends_headers_frame_without_path as test;
$body
}
#[test]
fn sends_headers_frame_without_status() {
use __group::sends_headers_frame_without_status as test;
$body
}
/// A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE
/// frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. A server
/// cannot set the SETTINGS_ENABLE_PUSH setting to a value other than 0 (see
/// Section 6.5.2).
#[test]
fn client_sends_push_promise_frame() {
use __group::client_sends_push_promise_frame as test;
$body
}
/// The CONNECT method (Section 9.3.6 of HTTP) is used to convert an HTTP
/// connection into a tunnel to a remote host. CONNECT is primarily used with
/// HTTP proxies to establish a TLS session with an origin server for the
/// purposes of interacting with "https" resources.
///
/// In HTTP/2, the CONNECT method establishes a tunnel over a single HTTP/2
/// stream to a remote host, rather than converting the entire connection to a
/// tunnel. A CONNECT header section is constructed as defined in Section 8.3.1
/// ("Request Pseudo-Header Fields"), with a few differences. Specifically:
///
/// The ":method" pseudo-header field is set to CONNECT.
/// The ":scheme" and ":path" pseudo-header fields MUST be omitted.
/// The ":authority" pseudo-header field contains the host and port to connect
/// to (equivalent to the authority-form of the request-target of CONNECT
/// requests; see Section 3.2.3 of [HTTP/1.1]).
#[test]
fn sends_connect_with_scheme() {
use __group::sends_connect_with_scheme as test;
$body
}
#[test]
fn sends_connect_with_path() {
use __group::sends_connect_with_path as test;
$body
}
#[test]
fn sends_connect_without_authority() {
use __group::sends_connect_without_authority as test;
$body
}
/// All pseudo-header fields MUST appear in a field block before all regular
/// field lines (RFC 9113, section 8.3)
#[test]
fn sends_headers_frame_with_pseudo_headers_after_regular_headers() {
use __group::sends_headers_frame_with_pseudo_headers_after_regular_headers as test;
$body
}
}
}
}
}
/// This generates a function that returns a Catalog of type
#[macro_export]
macro_rules! gen_catalog {
($catalog_fn_name:ident) => {
use ::httpwg::BoxedTest;
pub fn $catalog_fn_name<IO: IntoHalves>() -> HashMap<&'static str, HashMap<&'static str, HashMap<&'static str, BoxedTest<IO>>>> {
let mut rfcs: HashMap<&'static str, HashMap<&'static str, HashMap<&'static str, BoxedTest<IO>>>> = Default::default();
{
let mut sections: HashMap<&'static str, _> = Default::default();
{
use ::httpwg::rfc9113::_3_starting_http2 as s;
let mut _3_starting_http2: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_3_starting_http2.insert(
"sends client connection preface",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_client_connection_preface(conn))),
);
_3_starting_http2.insert(
"sends invalid connection preface",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_invalid_connection_preface(conn))),
);
sections.insert("3. starting http2", _3_starting_http2);
}
{
use ::httpwg::rfc9113::_4_http_frames as s;
let mut _4_http_frames: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_4_http_frames.insert(
"sends frame with unknown type",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_unknown_type(conn))),
);
_4_http_frames.insert(
"sends frame with unused flags",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_unused_flags(conn))),
);
_4_http_frames.insert(
"sends frame with reserved bit set",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_reserved_bit_set(conn))),
);
_4_http_frames.insert(
"data frame with max length",
Box::new(|conn: Conn<IO>| Box::pin(s::data_frame_with_max_length(conn))),
);
_4_http_frames.insert(
"frame exceeding max size",
Box::new(|conn: Conn<IO>| Box::pin(s::frame_exceeding_max_size(conn))),
);
_4_http_frames.insert(
"large headers frame exceeding max size",
Box::new(|conn: Conn<IO>| Box::pin(s::large_headers_frame_exceeding_max_size(conn))),
);
_4_http_frames.insert(
"invalid header block fragment",
Box::new(|conn: Conn<IO>| Box::pin(s::invalid_header_block_fragment(conn))),
);
_4_http_frames.insert(
"priority frame while sending headers",
Box::new(|conn: Conn<IO>| Box::pin(s::priority_frame_while_sending_headers(conn))),
);
_4_http_frames.insert(
"headers frame to another stream",
Box::new(|conn: Conn<IO>| Box::pin(s::headers_frame_to_another_stream(conn))),
);
sections.insert("4. http frames", _4_http_frames);
}
{
use ::httpwg::rfc9113::_5_streams_and_multiplexing as s;
let mut _5_streams_and_multiplexing: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_5_streams_and_multiplexing.insert(
"idle sends data frame",
Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_data_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"idle sends rst stream frame",
Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_rst_stream_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"idle sends window update frame",
Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_window_update_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"idle sends continuation frame",
Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_continuation_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"half closed remote sends data frame",
Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_data_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"half closed remote sends headers frame",
Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_headers_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"half closed remote sends continuation frame",
Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_continuation_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends data frame after rst stream",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_data_frame_after_rst_stream(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends headers frame after rst stream",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_headers_frame_after_rst_stream(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends continuation frame after rst stream",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_continuation_frame_after_rst_stream(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends data frame",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_data_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends headers frame",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_headers_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"closed sends continuation frame",
Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_continuation_frame(conn))),
);
_5_streams_and_multiplexing.insert(
"sends even numbered stream identifier",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_even_numbered_stream_identifier(conn))),
);
_5_streams_and_multiplexing.insert(
"sends smaller stream identifier",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_smaller_stream_identifier(conn))),
);
_5_streams_and_multiplexing.insert(
"exceeds concurrent stream limit",
Box::new(|conn: Conn<IO>| Box::pin(s::exceeds_concurrent_stream_limit(conn))),
);
_5_streams_and_multiplexing.insert(
"invalid ping frame for connection close",
Box::new(|conn: Conn<IO>| Box::pin(s::invalid_ping_frame_for_connection_close(conn))),
);
_5_streams_and_multiplexing.insert(
"test invalid ping frame for goaway",
Box::new(|conn: Conn<IO>| Box::pin(s::test_invalid_ping_frame_for_goaway(conn))),
);
_5_streams_and_multiplexing.insert(
"unknown extension frame in header block",
Box::new(|conn: Conn<IO>| Box::pin(s::unknown_extension_frame_in_header_block(conn))),
);
sections.insert("5. streams and multiplexing", _5_streams_and_multiplexing);
}
{
use ::httpwg::rfc9113::_6_frame_definitions as s;
let mut _6_frame_definitions: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_6_frame_definitions.insert(
"sends data frame with zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_with_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends data frame on invalid stream state",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_on_invalid_stream_state(conn))),
);
_6_frame_definitions.insert(
"sends data frame with invalid pad length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_with_invalid_pad_length(conn))),
);
_6_frame_definitions.insert(
"sends headers frame with zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends headers frame with invalid pad length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_invalid_pad_length(conn))),
);
_6_frame_definitions.insert(
"sends priority frame with zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_priority_frame_with_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends priority frame with invalid length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_priority_frame_with_invalid_length(conn))),
);
_6_frame_definitions.insert(
"sends rst stream frame with zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends rst stream frame on idle stream",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_on_idle_stream(conn))),
);
_6_frame_definitions.insert(
"sends rst stream frame with invalid length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_invalid_length(conn))),
);
_6_frame_definitions.insert(
"sends settings frame with ack and payload",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_ack_and_payload(conn))),
);
_6_frame_definitions.insert(
"sends settings frame with non zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_non_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends settings frame with invalid length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_invalid_length(conn))),
);
_6_frame_definitions.insert(
"sends settings enable push with invalid value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_enable_push_with_invalid_value(conn))),
);
_6_frame_definitions.insert(
"sends settings initial window size with invalid value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_initial_window_size_with_invalid_value(conn))),
);
_6_frame_definitions.insert(
"sends settings max frame size with invalid value below initial",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_max_frame_size_with_invalid_value_below_initial(conn))),
);
_6_frame_definitions.insert(
"sends settings max frame size with invalid value above max",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_max_frame_size_with_invalid_value_above_max(conn))),
);
_6_frame_definitions.insert(
"sends settings frame with unknown identifier",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_unknown_identifier(conn))),
);
_6_frame_definitions.insert(
"sends multiple values of settings initial window size",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_values_of_settings_initial_window_size(conn))),
);
_6_frame_definitions.insert(
"sends settings frame without ack flag",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_without_ack_flag(conn))),
);
_6_frame_definitions.insert(
"sends ping frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame(conn))),
);
_6_frame_definitions.insert(
"sends ping frame with ack",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_ack(conn))),
);
_6_frame_definitions.insert(
"sends ping frame with non zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_non_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends ping frame with invalid length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_invalid_length(conn))),
);
_6_frame_definitions.insert(
"sends goaway frame with non zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_goaway_frame_with_non_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends window update frame with zero increment",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_zero_increment(conn))),
);
_6_frame_definitions.insert(
"sends window update frame with zero increment on stream",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_zero_increment_on_stream(conn))),
);
_6_frame_definitions.insert(
"sends window update frame with invalid length",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_invalid_length(conn))),
);
_6_frame_definitions.insert(
"sends settings frame to set initial window size to 1 and sends headers frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame(conn))),
);
_6_frame_definitions.insert(
"sends multiple window update frames increasing flow control window above max",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_window_update_frames_increasing_flow_control_window_above_max(conn))),
);
_6_frame_definitions.insert(
"sends multiple window update frames increasing flow control window above max on stream",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream(conn))),
);
_6_frame_definitions.insert(
"changes settings initial window size after sending headers frame",
Box::new(|conn: Conn<IO>| Box::pin(s::changes_settings_initial_window_size_after_sending_headers_frame(conn))),
);
_6_frame_definitions.insert(
"sends settings frame for window size to be negative",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_for_window_size_to_be_negative(conn))),
);
_6_frame_definitions.insert(
"sends settings initial window size with exceeded max window size value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_initial_window_size_with_exceeded_max_window_size_value(conn))),
);
_6_frame_definitions.insert(
"sends multiple continuation frames preceded by headers frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_continuation_frames_preceded_by_headers_frame(conn))),
);
_6_frame_definitions.insert(
"sends continuation frame followed by non continuation frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_followed_by_non_continuation_frame(conn))),
);
_6_frame_definitions.insert(
"sends continuation frame with zero stream id",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_with_zero_stream_id(conn))),
);
_6_frame_definitions.insert(
"sends continuation frame preceded by headers frame with end headers flag",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag(conn))),
);
_6_frame_definitions.insert(
"sends continuation frame preceded by continuation frame with end headers flag",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag(conn))),
);
_6_frame_definitions.insert(
"sends continuation frame preceded by data frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_data_frame(conn))),
);
sections.insert("6. frame definitions", _6_frame_definitions);
}
{
use ::httpwg::rfc9113::_7_error_codes as s;
let mut _7_error_codes: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_7_error_codes.insert(
"sends goaway frame with unknown error code",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_goaway_frame_with_unknown_error_code(conn))),
);
_7_error_codes.insert(
"sends rst stream frame with unknown error code",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_unknown_error_code(conn))),
);
sections.insert("7. error codes", _7_error_codes);
}
{
use ::httpwg::rfc9113::_8_expressing_http_semantics_in_http2 as s;
let mut _8_expressing_http_semantics_in_http2: HashMap<&'static str, BoxedTest<IO>> = Default::default();
_8_expressing_http_semantics_in_http2.insert(
"sends second headers frame without end stream",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_second_headers_frame_without_end_stream(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with incorrect content length single data frame",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_incorrect_content_length_single_data_frame(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with incorrect content length multiple data frames",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_incorrect_content_length_multiple_data_frames(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with uppercase field name",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_uppercase_field_name(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with space in field name",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_space_in_field_name(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with non visible ascii",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_non_visible_ascii(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with del character",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_del_character(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with non ascii character",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_non_ascii_character(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with colon in field name",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_colon_in_field_name(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with lf in field value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_lf_in_field_value(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with cr in field value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_cr_in_field_value(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with nul in field value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_nul_in_field_value(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with leading space in field value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_leading_space_in_field_value(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with trailing tab in field value",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_trailing_tab_in_field_value(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with connection header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_connection_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with proxy connection header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_proxy_connection_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with keep alive header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_keep_alive_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with transfer encoding header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_transfer_encoding_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with upgrade header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_upgrade_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with te trailers",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_te_trailers(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with te not trailers",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_te_not_trailers(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with response pseudo header",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_response_pseudo_header(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with pseudo header in trailer",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_pseudo_header_in_trailer(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with duplicate pseudo headers",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_duplicate_pseudo_headers(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with mismatched host authority",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_mismatched_host_authority(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with empty path component",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_empty_path_component(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame without method",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_method(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame without scheme",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_scheme(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame without path",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_path(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame without status",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_status(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"client sends push promise frame",
Box::new(|conn: Conn<IO>| Box::pin(s::client_sends_push_promise_frame(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends connect with scheme",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_with_scheme(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends connect with path",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_with_path(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends connect without authority",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_without_authority(conn))),
);
_8_expressing_http_semantics_in_http2.insert(
"sends headers frame with pseudo headers after regular headers",
Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_pseudo_headers_after_regular_headers(conn))),
);
sections.insert("8. expressing http semantics in http2", _8_expressing_http_semantics_in_http2);
}
rfcs.insert("RFC 9113", sections);
}
rfcs
}
}
}