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

Missing messages fixes #1007

Merged
merged 5 commits into from
Aug 30, 2021
Merged

Missing messages fixes #1007

merged 5 commits into from
Aug 30, 2021

Conversation

buger
Copy link
Owner

@buger buger commented Aug 30, 2021

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:
- 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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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

Copy link
Owner Author

buger commented Aug 30, 2021

Quality gate Quality gate: Passed

No issues Everything looks good
Details

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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
Copy link

sonarcloud bot commented Aug 30, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
5.7% 5.7% Duplication

@buger buger merged commit d5c9ea5 into release-1.3 Aug 30, 2021
buger added a commit that referenced this pull request Aug 30, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants