You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The authority header is not stable across invocations of self.get_http_request_header() and the related variants. I was not able to reproduce the issue with GET requests, but is very easily reproducible with POST requests with a body.
The authority header is changed from the incoming one (e.g. requestbin) to the one specified in the route configuration (host rewrite) (e.g. f85bd0cbc72fec2729a2267267df5a57.m.pipedream.net)
Then the issue is NOT reproducible and works as expected 100% of the trials
The text was updated successfully, but these errors were encountered:
SvetlinZarev
changed the title
The authority header is not stable accross invocations of self.get_http_request_header() and the related variants
The authority header is not stable across invocations of self.get_http_request_header() and the related variants
Nov 19, 2020
Are you testing with latest Envoy? I think you might be hitting the same issue as we discussed in #43, i.e. request body is being processed even when headers are paused. This was fixed a few days ago in proxy-wasm/proxy-wasm-cpp-host#95 and envoyproxy/envoy#13840.
With those fixes, request headers should be stable until you resume request processing. However, since those headers can be modified by other Proxy-Wasm plugins and/or native extensions in the proxy, you might see different headers in later callbacks.
Is that reasonable or do you need to always see the original request headers, and not the headers sent upstream?
Summary:
The authority header is not stable across invocations of
self.get_http_request_header()
and the related variants. I was not able to reproduce the issue with GET requests, but is very easily reproducible with POST requests with a body.NB: This is the same setup as in #54
MCVE
Sample envoy configuration (can be reproduced on istio as well)
As the requestbin is not publicly visible you'll have to create your own and update the configuration accordingly.
Steps to reproduce
I'm reproducing it in a docker image (thus the localhost address), but can be done also on k8s with istio.
Make a POST request WITH a body (maybe related to #54 ).
Expectation
On envoy side
I expect to see in the logs that the authority header remains the same across invocations of
self.get_http_request_header()
. Example:What actually happens
On envoy side
The authority header is changed from the incoming one (e.g. requestbin) to the one specified in the route configuration (host rewrite) (e.g. f85bd0cbc72fec2729a2267267df5a57.m.pipedream.net)
Without a request body
If you make the same request but without the body, or make a GET request
Then the issue is NOT reproducible and works as expected 100% of the trials
The text was updated successfully, but these errors were encountered: