[Twisted-web] proxy http 204
bnkuhn at gmail.com
Fri Apr 24 18:27:14 EDT 2009
I got it to work by stripping the keep-alive headers and manually calling my
handleResponseEnd when handleEndHeaders is called for requests having
I'd still like to keep connections alive if possible, so I may do something
more sophisticated in the future, but this will do for now. Thanks for the
On Fri, Apr 24, 2009 at 2:01 PM, Brian Kuhn <bnkuhn at gmail.com> wrote:
> Now that you mention it, this probably does have something to do with the
> server keeping the connection alive since the client is sending keep-alive
> Keep-Alive : 300
> Proxy-Connection: keep-alive
> I'm going to investigate this a little further before I post my code. I'=
> let you know what I find out.
> On Fri, Apr 24, 2009 at 1:01 PM, Jean-Paul Calderone <exarkun at divmod.com>=
>> On Fri, 24 Apr 2009 12:40:33 -0700, Brian Kuhn <bnkuhn at gmail.com> wrote:
>>> I understand what a 204 is. It appears though that the framework is
>>> on them...not my code.
>>> Twisted calls my handleEndHeaders method, then hangs for awhile, then
>>> my handleResponseEnd method.
>>> Perhaps there is something I need to do in the handleStatus method to
>>> preempt this behavior. Any idea how I can tell Twisted to not timeout
>>> waiting for content that will never come?
>> I dunno, maybe. It's hard to know without being able to see your code.
>> I suppose you have an HTTPClient subclass? Or maybe a ProxyClient sub-
>> class? Likely you should be getting a `handleResponseEnd` when the
>> connection is closed. If the server never closes the connection, then
>> perhaps you'll never get `handleResponseEnd`, I'm not sure.
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web