valyala/fasthttp

Request should not fail on small ReadBufferSize

Chiusa

#1873 aperta il 24 set 2024

 (4 commenti) (0 reazioni) (0 assegnatari)Go (1755 fork)batch import
help wantedwontfix

Metriche repository

Star
 (21.741 stelle)
Metriche merge PR
 (Merge medio 3g) (44 PR mergiate in 30 g)

Descrizione

Can we not fail request if the req/resp header size is greater than the read buffer size.

I can see a bufio bug was mentioned for tryRead function but looks like it's resolved now. Can we have the above mentioned behaviour?

Also, some callback could also be configured to inform that buffer size was low. Library users could emit metrics and increase the buffer size appropriately to have best balance between memory usage and CPU usage.

@valyala Could you review the request?

Guida contributor