Re: [jetty-users] Should fully consume the InputStream of InputStreamResponseListener before close it?

2019-10-09 Thread Đạt Cao Mạnh
Oh that totally makes sense! Thanks a lot for clarifying! ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Re: [jetty-users] Should fully consume the InputStream of InputStreamResponseListener before close it?

2019-10-09 Thread Greg Wilkins
Close on the input stream will not close the connection. But it will cause the server that is writing content to have a broken pipe exception and then they will close the connection. If the server is not confident the request/response cycle has completed normally, then it will close the

Re: [jetty-users] Should fully consume the InputStream of InputStreamResponseListener before close it?

2019-10-09 Thread Đạt Cao Mạnh
Hi Greg, I just want to confirm, close() here is called on InputStream. By calling that it will close the underlying connection too? And it even true in case of HTTP/2? Thanks a lot! Vào Th 4, 9 thg 10, 2019 lúc 05:28 Greg Wilkins đã viết: > > Cao, > > The answer is "it depends". > > Closing

Re: [jetty-users] Should fully consume the InputStream of InputStreamResponseListener before close it?

2019-10-08 Thread Greg Wilkins
Cao, The answer is "it depends". Closing the stream will result in the connection being closed and not reused for other requests. Making new connections can be expensive, especially if SSL is used, plus new connections are often slower than old connections as their flow control windows are not

[jetty-users] Should fully consume the InputStream of InputStreamResponseListener before close it?

2019-10-08 Thread Đạt Cao Mạnh
Hi guys, I kinda see this pattern frequently in Apache HttpClient Please note that if response content is not fully consumed the underlying connection cannot be safely re-used and will be shut down and discarded by the connection manager. Wondering it will be the same pattern need to apply