[Twisted-web] web2.client pipelining (was: Web2: What is to be Done)

Scott Lamb slamb at slamb.org
Thu Sep 14 14:33:10 CDT 2006

On Sep 14, 2006, at 11:36 AM, James Y Knight wrote:
> The twisted.web2.client.HTTPClientProtocol.submitRequest has a  
> keyword arg "closeAfter", which defaults to True. Thus, without you  
> doing anything to change it, there is no keepalive and no  
> pipelining. Each connection will only be usable for one request.  
> Pipelining and keepalive features should really only be enabled  
> when a request is submitted by a client manager which is able to  
> handle the appropriate failure retry conditions.

Maybe this could be replaced with "idempotent" with an appropriate  
docstring? It'd accomplish the same thing, but it would then be  
obvious to people who haven't read a pile of RFCs under what  
circumstances they need it set in a particular way. With a  
"closeAfter" argument, it's tempting to say "of course I want  
closeAfter=False; I'm sending more stuff and one connection is  
faster" without realizing the consequences. If idempotency is what  
decides the behavior, then that's what the client should tell you.

Scott Lamb <http://www.slamb.org/>

More information about the Twisted-web mailing list