-
Notifications
You must be signed in to change notification settings - Fork 58
Improve Full Packet parsing for HTTP #1029
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
Conversation
proto/proto.go
Outdated
@@ -463,6 +464,30 @@ type HTTPState struct { | |||
Continue100 bool | |||
} | |||
|
|||
var ValidHttpStart = [][]byte{ |
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.
exported var ValidHttpStart should have comment or be unexported
var ValidHttpStart should be ValidHTTPStart
proto/proto.go
Outdated
@@ -463,6 +464,30 @@ type HTTPState struct { | |||
Continue100 bool | |||
} | |||
|
|||
var ValidHttpStart = [][]byte{ |
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.
exported var ValidHttpStart should have comment or be unexported
var ValidHttpStart should be ValidHTTPStart
JB Feldman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
SonarCloud Quality Gate failed.
|
It still says that I havent signed the license, but I have |
Thank you, looks good! |
This PR does two primary things: - ensures that HasFullPayload returns false if the packet doesnt start with a valid request or response header. This was necessary because a chunked response would return true from HasFullPayload if it got contiguous packets including the last packet (with the trailer) before it got the first packet (with the header). - When the request payload is chunked across multiple packets, only correct for 100-Continue responses once. In requests with > 2 packets, the Ack number is incremented for each packet in the message, sometimes resulting in packets not being correlated with each other. This ensures that the message is corrected once and only once.
This PR does two primary things: