solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.09k stars 441 forks source link

Append Header option - APPEND_IF_EXISTS_OR_ADD not working as expected #9733

Open DreyfussDaena opened 3 months ago

DreyfussDaena commented 3 months ago

Gloo Edge Product

Enterprise

Gloo Edge Version

gloo-ee-1.16.11-alpine

Kubernetes Version

v1.28.6

Describe the bug

We are integrating gloo envoy with ext_proc extension and attempt to utilize the HeaderValueOption.HeaderAppendAction as documented here: Envoy Proxy Documentation In our scenario we have an endpoint for which we send an HTTP request with the following header: Key: header1 Value: a Subsequently, we have a gRPC server that appends the same header key with a different value: Key: header1 Value: b

Please advise. Thank you.

Expected Behavior

We expect the result to be header1: a, b, however, the actual result is header1: b (the original value is being overridden). We have verified that the HeaderValueOption is set to APPEND_IF_EXISTS_OR_ADD, but it doesn't seem to function as expected.

Steps to reproduce the bug

Set HeaderValueOption to APPEND_IF_EXISTS_OR_ADD send 2 HTTP requests. One with header1: a The other with header1: b

Additional Environment Detail

No response

Additional Context

No response

nfuden commented 3 months ago

This is with regards to the ext proc append option.

DreyfussDaena commented 1 month ago

Hi @nfuden @DuncanDoyle we noticed that OVERWRITE_IF_EXISTS is also not giving us the expected outcome. It seems like no matter what header addition request enum we use, we are receiving 2 (OVERWRITE_IF_EXISTS_OR_ADD). Could you please have a look into this and ensure all headers are working as expected. Thanks.