-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix returning value for empty header and make possible to differentiate between missing header and empty header #305
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
079fa02
to
e74213e
Compare
Which host returns This code is a legacy code path for "header not found" from Proxy-Wasm ABI v0.1.0, and I'd expect that hosts would return a valid pointer to a zero-sized string, although I guess returning Also, you need to make the same change in (Please ignore the CI failures, they'll get fixed once #306 is merged) |
@PiotrSikora I was working with envoy 1.31. I think i got same result with latest envoy(1.33), but I will confirm that.
Actually I made change in that method itself. |
@PiotrSikora I think |
Oops, sorry! Yes, I've meant that the same change should be made in both Also, |
The method get_http_request_headers_bytes return empty vec for empty header value but get_http_request_header_bytes returns None for empty header value. Also added same fix in get_map_value for get_http_request_header method. This commit intends to fix this inconsistency. Signed-off-by: prembhaskal <[email protected]>
e74213e
to
6061be8
Compare
@PiotrSikora I have updated the method |
The method
get_http_request_headers_bytes
return empty vector for empty header value butget_http_request_header_bytes
returns None for empty header value.Similarly
get_http_request_headers
returns empty String butget_http_request_header
returns None.This commit intends to fix this inconsistency.
With this, it will be possible to differentiate between two cases, a missing header and a header with empty value.