Skip to content

http_server: add an accessor to read request header #4903

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

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

Watson1978
Copy link
Contributor

@Watson1978 Watson1978 commented Apr 11, 2025

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:
I'm creating a plugin using http_server, but I need to change the processing depending on the received request header.
So, I want an accessor to read request header in Fluent::PluginHelper::HttpServer::Request

Docs Changes:
fluent/fluentd-docs-gitbook#576

Release Note:

  • http_server helper: add header method for Request.

@Watson1978 Watson1978 requested review from daipom and kenhys April 11, 2025 05:44
@daipom daipom added this to the v1.19.0 milestone Apr 11, 2025
@daipom
Copy link
Contributor

daipom commented Apr 11, 2025

Thanks!
The implementation looks good to me.

Could you add some tests for this?

@Watson1978
Copy link
Contributor Author

I added the test file for Fluent::PluginHelper::HttpServer::Request.

Signed-off-by: Shizuo Fujita <[email protected]>
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@daipom
Copy link
Contributor

daipom commented Apr 11, 2025

Docs Changes:
TODO: https://docs.fluentd.org/plugin-helper-overview/api-plugin-helper-http_server#request

If you have time, I'd be happy if you could make a draft PR.

@daipom daipom merged commit 2cb45d7 into fluent:master Apr 11, 2025
9 of 10 checks passed
@Watson1978
Copy link
Contributor Author

OK, I will send a Pull Request to docs

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.

2 participants