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

First byte timeout #3454

Closed
DFINITYManu opened this issue Dec 1, 2023 · 2 comments
Closed

First byte timeout #3454

DFINITYManu opened this issue Dec 1, 2023 · 2 comments
Labels
C-feature Category: feature. This is adding a new feature.

Comments

@DFINITYManu
Copy link

We have in hyper a HTTP1 header read timeout (which is strangely not available for HTTP?) and this works great... if the client sends at least one byte (or a newline?).

If the client never sends a single byte, and just holds the connection open, the timeout never triggers.

I suggest we either make the timeout trigger even when no bytes have been sent (make the timer start ticking the minute serve_connection() is called) or we introduce another field explicitly for first byte timeout.

This will harden hyper servers against clients who attempt to open and hog connections open without any intention of sending any data.

@DFINITYManu DFINITYManu added the C-feature Category: feature. This is adding a new feature. label Dec 1, 2023
@seanmonstar
Copy link
Member

Yes, several have indicated that a separate timeout makes sense: #3185 (comment)

@finnbear
Copy link

Now that the header read timeout starts immediately, this issue can be closed as resolved 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants