12
12
from pcapkit .corekit .fields .misc import ConditionalField , SchemaField , SwitchField
13
13
from pcapkit .corekit .fields .numbers import EnumField , NumberField , UInt8Field , UInt32Field
14
14
from pcapkit .corekit .fields .strings import BitField , BytesField , PaddingField
15
- from pcapkit .protocols .schema .schema import Schema
15
+ from pcapkit .protocols .schema .schema import Schema , schema_final
16
16
from pcapkit .utilities .logging import SPHINX_TYPE_CHECKING
17
17
18
18
__all__ = [
@@ -101,6 +101,7 @@ def http_frame_selector(pkt: 'dict[str, Any]') -> 'Field':
101
101
return SchemaField (length = pkt ['__length__' ], schema = UnassignedFrame )
102
102
103
103
104
+ @schema_final
104
105
class HTTP (Schema ):
105
106
"""Header schema for HTTP/2 packet."""
106
107
@@ -163,6 +164,7 @@ def post_process(self, packet: 'dict[str, Any]') -> 'Schema':
163
164
return self
164
165
165
166
167
+ @schema_final
166
168
class UnassignedFrame (FrameType ):
167
169
"""Header schema for unassigned HTTP/2 frame payload."""
168
170
@@ -173,6 +175,7 @@ class UnassignedFrame(FrameType):
173
175
def __init__ (self , data : 'bytes' ) -> 'None' : ...
174
176
175
177
178
+ @schema_final
176
179
class DataFrame (FrameType ):
177
180
"""Header schema for HTTP/2 ``DATA`` frames."""
178
181
@@ -199,6 +202,7 @@ class Flags(FrameType.Flags):
199
202
def __init__ (self , pad_len : 'Optional[int]' , data : 'bytes' ) -> 'None' : ...
200
203
201
204
205
+ @schema_final
202
206
class HeadersFrame (FrameType ):
203
207
"""Header schema for HTTP/2 ``HEADERS`` frames."""
204
208
@@ -242,6 +246,7 @@ class Flags(FrameType.Flags):
242
246
def __init__ (self , pad_len : 'Optional[int]' , stream_dep : 'Optional[StreamDependency]' , weight : 'Optional[int]' , fragment : 'bytes' ) -> 'None' : ...
243
247
244
248
249
+ @schema_final
245
250
class PriorityFrame (FrameType ):
246
251
"""Header schema for HTTP/2 ``PRIORITY`` frames."""
247
252
@@ -257,6 +262,7 @@ class PriorityFrame(FrameType):
257
262
def __init__ (self , stream : 'StreamDependency' , weight : 'int' ) -> 'None' : ...
258
263
259
264
265
+ @schema_final
260
266
class RSTStreamFrame (FrameType ):
261
267
"""Header schema for HTTP/2 ``RST_STREAM`` frames."""
262
268
@@ -267,6 +273,7 @@ class RSTStreamFrame(FrameType):
267
273
def __init__ (self , error : 'Enum_ErrorCode' ) -> 'None' : ...
268
274
269
275
276
+ @schema_final
270
277
class SettingPair (Schema ):
271
278
"""Header schema for HTTP/2 ``SETTINGS`` frame setting pairs."""
272
279
@@ -279,6 +286,7 @@ class SettingPair(Schema):
279
286
def __init__ (self , id : 'Enum_Setting' , value : 'int' ) -> 'None' : ...
280
287
281
288
289
+ @schema_final
282
290
class SettingsFrame (FrameType ):
283
291
"""Header schema for HTTP/2 ``SETTINGS`` frames."""
284
292
@@ -297,6 +305,7 @@ class Flags(FrameType.Flags):
297
305
def __init__ (self , settings : 'list[SettingPair] | bytes' ) -> 'None' : ...
298
306
299
307
308
+ @schema_final
300
309
class PushPromiseFrame (FrameType ):
301
310
"""Header schema for HTTP/2 ``PUSH_PROMISE`` frames."""
302
311
@@ -329,6 +338,7 @@ class Flags(FrameType.Flags):
329
338
def __init__ (self , pad_len : 'Optional[int]' , stream : 'StreamID' , fragment : 'bytes' ) -> 'None' : ...
330
339
331
340
341
+ @schema_final
332
342
class PingFrame (FrameType ):
333
343
"""Header schema for HTTP/2 ``PING`` frames."""
334
344
@@ -344,6 +354,7 @@ class Flags(FrameType.Flags):
344
354
def __init__ (self , data : 'bytes' ) -> 'None' : ...
345
355
346
356
357
+ @schema_final
347
358
class GoawayFrame (FrameType ):
348
359
"""Header schema for HTTP/2 ``GOAWAY`` frames."""
349
360
@@ -360,6 +371,7 @@ class GoawayFrame(FrameType):
360
371
def __init__ (self , stream : 'StreamID' , error : 'Enum_ErrorCode' , debug : 'bytes' ) -> 'None' : ...
361
372
362
373
374
+ @schema_final
363
375
class WindowUpdateFrame (FrameType ):
364
376
"""Header schema for HTTP/2 ``WINDOW_UPDATE`` frames."""
365
377
@@ -372,6 +384,7 @@ class WindowUpdateFrame(FrameType):
372
384
def __init__ (self , size : 'WindowSize' ) -> 'None' : ...
373
385
374
386
387
+ @schema_final
375
388
class ContinuationFrame (FrameType ):
376
389
"""Header schema for HTTP/2 ``CONTINUATION`` frames."""
377
390
0 commit comments