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

add default readtimeout and writetimeout #10701

Closed
wants to merge 3 commits into from
Closed

Conversation

J-lena
Copy link

@J-lena J-lena commented Jul 23, 2024

Description

Link to tracking issue

Fixes #10469

Testing

add a test function : TestSetDefaultConfig. beasecause the config_test has some failures, so i change makefile.common to only run mytest

Documentation

@J-lena J-lena requested review from a team and codeboten July 23, 2024 07:06
Copy link

linux-foundation-easycla bot commented Jul 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@J-lena
Copy link
Author

J-lena commented Jul 23, 2024

CLA Missing ID CLA Not Signed

@codeboten hi , how can i Restart this process.

@J-lena J-lena force-pushed the main branch 3 times, most recently from 4f0a5f7 to e21f127 Compare July 23, 2024 07:23
Signed-off-by: lenajiang <yufangjiang@harmonycloud.cn>
@codeboten
Copy link
Contributor

@J-lena it looks like the easy CLA check is all good now

Screenshot 2024-07-23 at 8 26 38 AM

Copy link
Contributor

github-actions bot commented Aug 7, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 7, 2024
@J-lena
Copy link
Author

J-lena commented Aug 9, 2024

@codeboten hi,has any problems about this commit?

@github-actions github-actions bot removed the Stale label Aug 9, 2024
@@ -48,6 +48,7 @@ $(TOOLS_BIN_NAMES): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod

.PHONY: test
test:
# $(GOTEST) $(GOTEST_OPT) -run TestSetDefaultConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this line?

}

if cfg.HTTP.WriteTimeout == 0 {
cfg.HTTP.WriteTimeout = defaultTimeout
Copy link
Contributor

Choose a reason for hiding this comment

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

at the very least this should be spelled out on the README.

This is not the right place to add this default value - it should be done in createDefaultConfig instead:

func createDefaultConfig() component.Config {

We can also change the way the default config is computed to use the confighttp.NewServerConfig and configgrpc.NewServerConfig instead of initializing structs by itself.

@atoulme
Copy link
Contributor

atoulme commented Aug 13, 2024

Please add a changelog.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 28, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[confighttp] OTE-01-004 WP1: Possible DoS Attacks on HTTP Services
3 participants