Appendix A. Non-Normative Processing Algorithm
The following algorithm illustrates how a client could handle received ORIGIN frames:
-
If the client is configured to use a proxy for the connection, ignore the frame and stop processing.
-
If the connection is not identified with the "h2" protocol identifier or another protocol that has explicitly opted into this specification, ignore the frame and stop processing.
-
If the frame occurs upon any stream except stream 0, ignore the frame and stop processing.
-
If any of the flags 0x1, 0x2, 0x4, or 0x8 are set, ignore the frame and stop processing.
-
If no previous ORIGIN frame on the connection has reached this step, initialize the Origin Set as per Section 2.3.
-
For each "Origin-Entry" in the frame payload:
-
Parse "ASCII-Origin" as an ASCII serialization of an origin ([RFC6454], Section 6.2), and let the result be "parsed_origin". If parsing fails, skip to the next "Origin-Entry".
-
Add "parsed_origin" to the Origin Set.
-