Thanks Simone, that makes sense. I haven't thought there is actually no other way for the server to know the response is fully consumed or not.
Thanks all! Nicolas On Mon, 11 Jan 2021 at 22:08, Simone Bordet <simone.bor...@gmail.com> wrote: > Hi, > > On Mon, Jan 11, 2021 at 9:28 PM Nicolas Henneaux > <nicolas.henne...@gmail.com> wrote: > > > > Hi Daniel, > > > > Thanks for your quick feedback. > > > > Indeed if I fetch all the bytes, the connection is kept. What's the > reason behind this behaviour? > > It's normal behavior. > > The server may have not finished to send all the bytes in case of > large response contents. > > If the client reuses the connection to send another request, when it > tries to read the response it will find bytes of the previous > response. > There is no other way than closing the connection to ensure that the > next request is not messed up. > In case you wonder, there are so many other ways to screw things up > that really, there is no other way than closing the connection :) > > -- > Simone Bordet > --- > Finally, no matter how good the architecture and design are, > to deliver bug-free software with optimal performance and reliability, > the implementation technique must be flawless. Victoria Livschitz >