-
Notifications
You must be signed in to change notification settings - Fork 0
test: Santosh test #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 To request another review, post a new comment with "/windsurf-review".
func (d *Decoder) SetAllowMissingFields(v bool) { | ||
d.allowMissingFields = v | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new public API function should have documentation explaining its purpose and behavior, similar to other public methods in this file.
if d.allowMissingFields { | ||
d.buf = buf | ||
return d.callEmit(HeaderField{Name: fmt.Sprintf("missing-index-%d", idx), Value: "none"}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an inconsistency in how missing fields are handled. In parseFieldIndexed()
, you set the value to "none", but in parseFieldLiteral()
, no value is set for missing fields. Consider using a consistent approach for both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is if complete header filed is indexed. (key and value)
For parseFieldLiteral
the value is not indexed, only header key
@t-santoshsahu are we actively pursuing this? |
ihf, ok := d.at(nameIdx) | ||
if !ok { | ||
return DecodingError{InvalidIndexError(nameIdx)} | ||
if !d.allowMissingFields { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have some unit tests to verify this logic.
We should probably have a readme on how to maintain it. |
Not actively pursuing it. I will get back to it. There seems to be an issue when there is packet loss, hpack indexing can cause mismatch. |
No description provided.