Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ebpftracer/ebpf/l7/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@ int is_http_response(char *buf, __s32 *status) {
return 0;
}
*status = (b[9]-'0')*100 + (b[10]-'0')*10 + (b[11]-'0');
if (*status / 100 == 1) {
return 2; // Return 2 to indicate a provisional response.
}
return 1;
}
3 changes: 3 additions & 0 deletions ebpftracer/ebpf/l7/l7.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ int trace_exit_read(void *ctx, __u64 id, __u32 pid, __u16 is_tls, long int ret)
COPY_PAYLOAD(e->payload, req->payload_size, req->payload);
if (e->protocol == PROTOCOL_HTTP) {
response = is_http_response(payload, &e->status);
if (response == 2) {
return 0;
}
} else if (e->protocol == PROTOCOL_POSTGRES) {
response = is_postgres_response(payload, ret, &e->status);
if (req->request_type == POSTGRES_FRAME_PARSE) {
Expand Down