Erik Dubbelboer
Erik Dubbelboer
Where would you suggest to add these hook properties? On `Client/HostClient` or on `Request`?
I guess if you want to be able to run the hook even on `fasthttp.Get` it needs to be some global variable. Maybe an [`atomic.Value`](https://golang.org/pkg/sync/atomic/#Value). If you can try making...
At my previous company we used fasthttp to handle 30k requests per second in production. At my current company we have a service using fasthttp that does on average 6k...
I'm afraid we currently don't have anything like this. What exactly do you want to trace? A pull request or a suggestion of how to do this is always welcome.
This is indeed expected behavior. I don't like it either but we can't change it without breaking backwards compatibility. If you can make a pull request to document this behavior...
fasthttp is already at 1.17. This would be something for fasthttp2 if that ever comes.
I don't work for VertaMedia. @valyala will have to answer this. 200K rps from more than 1.5M concurrent keep-alive connections will require a very very heavy server. Unless you aren't...
Your second option, https://github.com/gofiber/fiber/tree/master/middleware/csrf , uses Fiber which uses fasthttp under the hood. I have never used any CSRF code for fasthttp before so I'm afraid I can't help.
This is because fasthttp always wants to set a Content-Type header for non GET/HEAD requests: https://github.com/valyala/fasthttp/blob/aa3f96c883322033099b4466c151893a3f9c2172/header.go#L1593-L1595 It is currently not possible to disable this. Maybe it would work for you...
For `ResponseHeader` we have [`ResponseHeader.SetNoDefaultContentType()`](https://godoc.org/github.com/valyala/fasthttp#ResponseHeader.SetNoDefaultContentType). I think we should add something similar for `RequestHeader`.