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

timeouts #143

Open
aep opened this issue Apr 7, 2018 · 2 comments
Open

timeouts #143

aep opened this issue Apr 7, 2018 · 2 comments

Comments

@aep
Copy link

aep commented Apr 7, 2018

Hi,

i'm looking at tiny-http from a production perspective.
The hello world example does not have any timeouts. I could easily DOS a hosts by just opening a couple thousand connections. Are those things left out intentionally or would you like to get some contributions to fix it?

@frewsxcv
Copy link
Member

frewsxcv commented Apr 8, 2018

I don't think it's intentional (unless @tomaka thinks otherwise), so I'd say go ahead and open a pull request for that if you're interested 👌

@tomaka
Copy link
Member

tomaka commented Apr 9, 2018

(It's not intentional!)

kolbma added a commit to kolbma/tiny-http that referenced this issue Jan 17, 2024
With default feature socket2 and the so called crate it is possible to create configurable TCP sockets. Needs MSRV 1.63.

Fixes issue tiny-http#143

There is a the new field socket_config: connection::SocketConfig in ServerConfig.
Call Server::new to create a server with your own config.

The defaults are...
keep_alive: true
no_delay: true
read_timeout: 10s
tcp_keepalive_interval: None
tcp_keepalive_time: 5s
write_timeout: 10s

README.md/Cargo.toml is going back to MSRV 1.60 and describes which feature needs a newer/higher Rust version.
kolbma added a commit to kolbma/tiny-http that referenced this issue Jan 17, 2024
With default feature socket2 and the so called crate it is possible to create configurable TCP sockets. Needs MSRV 1.63.

Fixes issue tiny-http#143

There is a the new field socket_config: connection::SocketConfig in ServerConfig.
Call Server::new to create a server with your own config.

The defaults are...
keep_alive: true
no_delay: true
read_timeout: 10s
tcp_keepalive_interval: None
tcp_keepalive_time: 5s
write_timeout: 10s

README.md/Cargo.toml is going back to MSRV 1.60 and describes which feature needs a newer/higher Rust version.
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

No branches or pull requests

3 participants