Skip to content
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

lua: Allow to set header entry as table to httpCall and respond APIs #7851

Merged
merged 4 commits into from
Aug 14, 2019
Merged

Conversation

dio
Copy link
Member

@dio dio commented Aug 7, 2019

Description: Extends httpCall() and respond() APIs to accept headers with values that can be strings or table of strings.

Risk Level: Low
Testing: Modified the existing unit tests
Docs Changes: Added
Release Notes: Added
Fixes #7742

Signed-off-by: Dhi Aurrahman dio@tetrate.io

dio added 2 commits August 7, 2019 19:21
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@dio dio changed the title lua: Allow to set header entry as table to httpCall and respond APIs WIP: lua: Allow to set header entry as table to httpCall and respond APIs Aug 7, 2019
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@dio
Copy link
Member Author

dio commented Aug 8, 2019

@mattklein123 do we want to return header values of the same header entry key as a table when we do headers:get() as well, should it be filtered for non-":" and predefined headers?

@mattklein123 mattklein123 self-assigned this Aug 8, 2019
@mattklein123
Copy link
Member

@mattklein123 do we want to return header values of the same header entry key as a table when we do headers:get() as well, should it be filtered for non-":" and predefined headers?

I'm concerned this might break existing scripts? WDYT? Perhaps we don't do it for now or provide some type of API ability to return it this way?

@mattklein123
Copy link
Member

@dio please let me know when this is no longer WIP. Thank you!

/wait

@dio dio changed the title WIP: lua: Allow to set header entry as table to httpCall and respond APIs lua: Allow to set header entry as table to httpCall and respond APIs Aug 8, 2019
@dio
Copy link
Member Author

dio commented Aug 8, 2019

@mattklein123 yes, think this is ready for review. Thank you!

While for getting multiple values from a header name can be done via :pairs for now.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with small nit. Thank you!

/wait

docs/root/intro/version_history.rst Outdated Show resolved Hide resolved
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@dio
Copy link
Member Author

dio commented Aug 12, 2019

Oops. Accepting suggestion hurts DCO. Did force pushing. Sorry.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM post security release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lua EnvoyFilter set multiple set-cookie header in request_handle functions
2 participants