diff --git a/ebpftracer/ebpf/l7/http.c b/ebpftracer/ebpf/l7/http.c index e6d98d9..61f6747 100644 --- a/ebpftracer/ebpf/l7/http.c +++ b/ebpftracer/ebpf/l7/http.c @@ -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; } diff --git a/ebpftracer/ebpf/l7/l7.c b/ebpftracer/ebpf/l7/l7.c index 081dcd4..1e3ad3b 100644 --- a/ebpftracer/ebpf/l7/l7.c +++ b/ebpftracer/ebpf/l7/l7.c @@ -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) {