Make writing Prioritized Element ID and Element Dependency ID optional when handling priority.
These fields are specified to be absent when priority type or dependency type is ROOT_OF_TREE.
On the decoding side, the absent fields will be parsed as 0 for default value. Those fields won't be used when later the frame is processed.
gfe-relnote: v99 only, not flag protected.
PiperOrigin-RevId: 254072432
Change-Id: I336e06b39d89ff01507e54818dafa67923e96e4c
diff --git a/quic/core/http/http_frames.h b/quic/core/http/http_frames.h
index f1aa7ff..ff59614 100644
--- a/quic/core/http/http_frames.h
+++ b/quic/core/http/http_frames.h
@@ -53,12 +53,12 @@
};
struct PriorityFrame {
- PriorityElementType prioritized_type;
- PriorityElementType dependency_type;
- bool exclusive;
- uint64_t prioritized_element_id;
- uint64_t element_dependency_id;
- uint8_t weight;
+ PriorityElementType prioritized_type = REQUEST_STREAM;
+ PriorityElementType dependency_type = REQUEST_STREAM;
+ bool exclusive = false;
+ uint64_t prioritized_element_id = 0;
+ uint64_t element_dependency_id = 0;
+ uint8_t weight = 0;
bool operator==(const PriorityFrame& rhs) const {
return prioritized_type == rhs.prioritized_type &&