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(networking): fix net_packet_http errors on empty OK #3538

Merged
merged 1 commit into from
Oct 2, 2023
Merged

fix(networking): fix net_packet_http errors on empty OK #3538

merged 1 commit into from
Oct 2, 2023

Conversation

rafaeldtinoco
Copy link
Contributor

The net_packet_http and net_packet_http_response events are failing for empty replies (such as HTTP/1.x 200 OK replies, for example). Ignore if there is some EOF trying to parse response... it usually means there is a single code response with no body.

The net_packet_http and net_packet_http_response events are failing for
empty replies (such as HTTP/1.x 200 OK replies, for example). Ignore if
there is some EOF trying to parse response... it usually means there is
a single code response with no body.
@rafaeldtinoco
Copy link
Contributor Author

@geyslan this might be something disturbing the HTTP tests (not sure), but definitely something causing error output where it shouldn't.

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM, just a question: deriveHTTPEvents will continue returning an error parsePacketError in such cases, is it expected?

@rafaeldtinoco
Copy link
Contributor Author

LGTM, just a question: deriveHTTPEvents will continue returning an error parsePacketError in such cases, is it expected?

There are 3 rets from eventToProtoHTTPResponse. As long as "err" == nil and "h" == nil, there won't be an error afaict.

@rafaeldtinoco rafaeldtinoco merged commit 2465407 into aquasecurity:main Oct 2, 2023
27 checks passed
@rafaeldtinoco rafaeldtinoco deleted the fix_http_responses branch October 2, 2023 20:38
rafaeldtinoco added a commit that referenced this pull request Oct 6, 2023
The net_packet_http and net_packet_http_response events are failing for
empty replies (such as HTTP/1.x 200 OK replies, for example). Ignore if
there is some EOF trying to parse response... it usually means there is
a single code response with no body.

commit: 2465407 (main), cherry-pick
@itaysk itaysk added kind/bug and removed kind/bug labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants