-
Notifications
You must be signed in to change notification settings - Fork 39
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
Missing messages fixes #1007
Missing messages fixes #1007
Conversation
This PR contains multiple fixes: - Handle TCP padding (zeroes at the end of TCP payload), and do not treat it as a body - Handle requests with "Expect: 100-Continue" - the ones which require confirmation from the server, before sending the body - Fix muti-packet headers parsing, if "truncated" header starts with malformed header format - Fix replay of pcap files (Ignore Stats method since it is not supported)
isChunked bool // Transfer-Encoding: chunked | ||
bodyLen int // Content-Length's value | ||
hasTrailer bool // Trailer header? | ||
type HTTPState struct { |
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 type HTTPState should have comment or be unexported
isChunked bool // Transfer-Encoding: chunked | ||
bodyLen int // Content-Length's value | ||
hasTrailer bool // Trailer header? | ||
type HTTPState struct { |
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 type HTTPState should have comment or be unexported
isChunked bool // Transfer-Encoding: chunked | ||
bodyLen int // Content-Length's value | ||
hasTrailer bool // Trailer header? | ||
type HTTPState struct { |
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 type HTTPState should have comment or be unexported
isChunked bool // Transfer-Encoding: chunked | ||
bodyLen int // Content-Length's value | ||
hasTrailer bool // Trailer header? | ||
type HTTPState struct { |
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 type HTTPState should have comment or be unexported
Everything looks good |
Otherwise replay will fail. At the moment it is not fully replay `Expect: 100 Continue` scheme, but possible to record and make it look like standard POST request.
Should reset file chunk size only when we doing final file close
} | ||
|
||
return true | ||
} | ||
|
||
func (parser *MessageParser) Fix100Continue(m *Message) { |
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 method MessageParser.Fix100Continue should have comment or be unexported
} | ||
|
||
return true | ||
} | ||
|
||
func (parser *MessageParser) Fix100Continue(m *Message) { |
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 method MessageParser.Fix100Continue should have comment or be unexported
} | ||
|
||
return true | ||
} | ||
|
||
func (parser *MessageParser) Fix100Continue(m *Message) { |
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 method MessageParser.Fix100Continue should have comment or be unexported
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
This PR contains multiple fixes: - Handle TCP padding (zeroes at the end of TCP payload), and do not treat it as a body - Handle requests with "Expect: 100-Continue" - the ones which require confirmation from the server, before sending the body - Fix muti-packet headers parsing, if "truncated" header starts with malformed header format - Fix replay of pcap files (Ignore Stats method since it is not supported) - Fix output file chunk size detection
This PR contains multiple fixes: