http: Improving HTTP/1.1 proxy support#23077
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
|
cc @bencebeky I'm just straight up using balsa here if you're good with it. It turns out http_parser stops one character early and I'd rather just use balsa. This filter is being rolled out for Envoy Mobile and all this does is validate a 200 OK response for CONNECT requests |
Sounds good to me. |
|
@snowp ping! |
| if (need_to_strip_connect_response_) { | ||
| // Limit the CONNECT response headers to an arbitrary 200 bytes. | ||
| constexpr uint32_t MAX_RESPONSE_HEADER_SIZE = 200; | ||
| // Limit the CONNECT response headers to an arbitrary 2000 bytes. |
There was a problem hiding this comment.
I know this is arbitrary but why the increase?
There was a problem hiding this comment.
I decided the prior arbitrary limit was too small :-)
Kuat has been talking about adding extra headers to the CONNECT headers, and Rafal was adding test headers in his integration test, so I want to handle more than just a raw response.
When the proxy filter was implemented it did direct string checks to ensure a 200 response. This addresses a TODO to accept any well formed 200 response.
Risk Level: low
Testing: new unit tests, integration tests
Docs Changes: n/a
Release Notes: n/a
Part of envoyproxy/envoy-mobile#1622