[Twisted-web] HTTPClient vs. HTTPClientFactory

Jean-Paul Calderone exarkun at divmod.com
Fri Apr 18 07:55:47 EDT 2008


On Thu, 17 Apr 2008 18:32:03 -0600, Andrew McNabb <amcnabb at mcnabbs.org> wrote:
>I'm still a little new to Twisted, so I was wondering if some kind soul
>might be willing to help make sure I'm looking at things correctly.
>
> [snip]
>
>I was also confused about why HTTPClientFactory would set
>`self.protocol.followRedirect = followRedirect` in its __init__ method.
>Since `self.protocol` is the HTTPPageGetter class, it appears that the
>client factory is setting the followRedirect attribute for all
>connections (associated with all HTTPClientFactories).  I was surprised
>that HTTPClientFactory wouldn't set `self.followRedirect =
>followRedirect`, in which case HTTPClient would look at
>`self.factory.followRedirect`.

You're right.  This seems to be a bug.  Could you file a ticket?

Jean-Paul



More information about the Twisted-web mailing list