envoyproxy/envoy

Envoy should register invalid HTTP as an attempt to send a request

Open

#9,821 opened on Jan 24, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)C++ (5,373 forks)batch import
area/httphelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Title: Envoy should register invalid HTTP as an attempt to send a request

Description: If a malformed HTTP1 request is sent (e.g. No headers, just "a\r\n\r\n") the HTTP1.1 code will reject it (https://github.com/envoyproxy/envoy/blob/master/source/common/http/http1/codec_impl.cc#L497) and send a 400 without creating a ConnectionManagerImpl::ActiveStream. This means that the stats around total requests (downstream_rq_total_ & similar) will not be modified, as they are modified by ConnectionManagerImpl::ActiveStream. It seems like an invalid request should still be counted in those statistics.

Contributor guide