Re: [Twisted-Python] HTTP Agent persistent connections not closed for some HTTPS sites

2017-03-09 Thread Adi Roiban
On 7 March 2017 at 09:31, Cory Benfield  wrote:
>
> On 6 Mar 2017, at 09:05, Adi Roiban  wrote:
>
> I am not sure about which code are we talking here.
> The specific HTTP11ClientProtocol which will fix only the HTTP client
> part or the generic TLSMemoryBIOProtocol code which might fix any TLS
> connection?
>
>
> I’m talking about the fact that calling TLSMemoryBIOProtocol.loseConnection
> may not ever actually drop the underlying FD is the surprising part of the
> code. We had to work around it in the server side by adding a timeout after
> loseConnection is called to end up calling abortConnection.
>
> Cory

In order to submit a patch, I am trying to write an automated tests for this.
Were you able to reproduce this issue in a controlled environment.

I am still not fully understanding why I get this behaviour with
sharepoint.com sites.

I am thinking at having a rigged TLS server which will keep the socket
open but will not
respond to the shutdown request but I still don't know how :)

-- 
Adi Roiban

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] HTTP Agent persistent connections not closed for some HTTPS sites

2017-03-09 Thread Jean-Paul Calderone
On Thu, Mar 9, 2017 at 3:40 PM, Adi Roiban  wrote:

> On 7 March 2017 at 09:31, Cory Benfield  wrote:
> >
> > On 6 Mar 2017, at 09:05, Adi Roiban  wrote:
> >
> > I am not sure about which code are we talking here.
> > The specific HTTP11ClientProtocol which will fix only the HTTP client
> > part or the generic TLSMemoryBIOProtocol code which might fix any TLS
> > connection?
> >
> >
> > I’m talking about the fact that calling TLSMemoryBIOProtocol.
> loseConnection
> > may not ever actually drop the underlying FD is the surprising part of
> the
> > code. We had to work around it in the server side by adding a timeout
> after
> > loseConnection is called to end up calling abortConnection.
> >
> > Cory
>
> In order to submit a patch, I am trying to write an automated tests for
> this.
> Were you able to reproduce this issue in a controlled environment.
>
> I am still not fully understanding why I get this behaviour with
> sharepoint.com sites.
>
> I am thinking at having a rigged TLS server which will keep the socket
> open but will not
> respond to the shutdown request but I still don't know how :)
>
>
Run the server with TLSMemoryBIOProtocol and use the transport's
pauseProducing method before you attempt the shutdown?

Jean-Paul


> --
> Adi Roiban
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python