Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect stream id in http2 protocol data frame #737

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuweizzz
Copy link
Contributor

should fix #736.

@dosubot dosubot bot added the fix bug fix PR label Feb 15, 2025
streamID := f.StreamID
frameBuf.WriteString(fmt.Sprintf("\nFrame Type\t=>\tDATA\nFrame StreamID\t=>\t%d\n", streamID))
payload := f.Data()
switch encodingMap[streamID] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to consider scenarios where streamID cannot be found?

case "gzip":
h2r.packerType = PacketTypeGzip
frameBuf.WriteString("Partial entity body with gzip encoding ... \n")
_, err := dataBufMap[streamID].Write(payload)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If dataBufMap[streamID] cannot be found, then a null pointer will appear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The stream id of the http2 protocol "Frame Type => DATA" is incorrect
2 participants