[Twisted-web] proxy http 204
bnkuhn at gmail.com
Fri Apr 24 15:40:33 EDT 2009
I understand what a 204 is. It appears though that the framework is hanging
on them...not my code.
Twisted calls my handleEndHeaders method, then hangs for awhile, then calls
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?
On Fri, Apr 24, 2009 at 12:01 PM, Jean-Paul Calderone <exarkun at divmod.com>w=
> On Fri, 24 Apr 2009 11:55:20 -0700, Brian Kuhn <bnkuhn at gmail.com> wrote:
>> I've written an http proxy using twisted. It works fine, except when
>> proxying an HTTP 204 response.
>> The handleStatus, handleHeader and handleEndHeaders all get called. Then
>> the process just hangs for 10+ seconds (presumably timing out). Then
>> handleResponseEnd gets called (never calling handleResponsePart).
>> All of this is expected, except for the hanging part. Anyone have any
>> what's going on here?
> 204 is "No Content". Quoting the RFC:
> The 204 response MUST NOT include a message-body, and thus is always
> terminated by the first empty line after the header fields.
> This, despite the fact that a 204 response may include a content-length
> header with a non-zero value. Make sure you're handling this properly.
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web