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

optimize: allow http head when use getonly #1456

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

li-jin-gou
Copy link
Contributor

@li-jin-gou li-jin-gou commented Dec 21, 2022

pr for #1455

Copy link
Collaborator

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

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

I guess it makes sense. But please also change the documentation here to reflect this:

fasthttp/server.go

Lines 292 to 299 in 2a572e0

// Rejects all non-GET requests if set to true.
//
// This option is useful as anti-DoS protection for servers
// accepting only GET requests. The request size is limited
// by ReadBufferSize if GetOnly is set.
//
// Server accepts all the requests by default.
GetOnly bool

@li-jin-gou
Copy link
Contributor Author

I guess it makes sense. But please also change the documentation here to reflect this:

fasthttp/server.go

Lines 292 to 299 in 2a572e0

// Rejects all non-GET requests if set to true.
//
// This option is useful as anti-DoS protection for servers
// accepting only GET requests. The request size is limited
// by ReadBufferSize if GetOnly is set.
//
// Server accepts all the requests by default.
GetOnly bool

thanks and done

@erikdubbelboer erikdubbelboer merged commit c637221 into valyala:master Dec 25, 2022
@erikdubbelboer
Copy link
Collaborator

Thanks!

@TheKigen
Copy link

Thank you.

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.

3 participants