Closed kirillDanshin closed 5 years ago
As you can see here https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L24
actually, you writing redundant \r\n. fasthttp already handles this for you. also, in such cases I'd recommend you to use https://godoc.org/github.com/valyala/fasthttp#Request.SetBody or SetBodyString.
finally, https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L21 you actually don't need to use a goroutine for this log message
@kirillDanshin Thanks for the feedbacks, I will renew it today after work.
Updated.
As you can see here https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L24
actually, you writing redundant \r\n. fasthttp already handles this for you. also, in such cases I'd recommend you to use https://godoc.org/github.com/valyala/fasthttp#Request.SetBody or SetBodyString.
finally, https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L21 you actually don't need to use a goroutine for this log message