In #5461 we introduced lengthReader to count the amount of bytes read from the request body.
We're allocating a new lengthReader on each request though (but only requests with a body, so not GETs). This is inefficient, it could be improved by using sync.Pool to reuse allocated lengthReader structs.
In #5461 we introduced
lengthReaderto count the amount of bytes read from the request body.We're allocating a new
lengthReaderon each request though (but only requests with a body, so not GETs). This is inefficient, it could be improved by usingsync.Poolto reuse allocatedlengthReaderstructs.