-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/filebeat/input/http_endpoint: ensure request body is closed when content is gzipped #37091
Conversation
c78a950
to
47e8ae3
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
// In order for the GZIP checksum to be verified, the reader must be | ||
// fully consumed until the io.EOF. | ||
// | ||
// After this call the reader should not be reused because it is returned to the pool. | ||
func (r *pooledGzipReader) Close() error { | ||
err := r.Reader.Close() | ||
_err := r.closer.Close() | ||
if err == nil { | ||
err = errors.Join(err, _err) |
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.
Should we ignore error
from closer.Close()
when Reader.Close()
returns an error?
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 don't, though the logic here can be simplified (what I have is a Frankenstein's monster that I should clean up). Thank you for raising it.
This comment was marked as outdated.
This comment was marked as outdated.
…en content is gzipped
2a2c4b6
to
e9deb31
Compare
…en content is gzipped (elastic#37091)
Proposed commit message
See title.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs