twisted.web no longer works with HTTP pipelining

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from ivank <[email protected]>:

I used twisted.web.static.File to serve a directory (Twisted trunk@27161). With pipelining enabled in Firefox 3.5, the server showed this traceback very often:

{{{

2009-07-18 06:30:34-0700 [HTTPChannel,1,192.168.0.3] Unhandled Error
        Traceback (most recent call last):
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/protocols/basic.py", line 238, in dataReceived
            why = self.lineReceived(line)
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/http.py", line 1455, in lineReceived
            self.allContentReceived()
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/http.py", line 1523, in allContentReceived
            req.requestReceived(command, path, version)
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/http.py", line 725, in requestReceived
            self.process()
        --- <exception caught here> ---
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/server.py", line 126, in process
            self.render(resrc)
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/server.py", line 133, in render
            body = resrc.render(self)
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/static.py", line 623, in render
            producer.start()
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/static.py", line 706, in start
            self.request.registerProducer(self, False)
          File "/opt/Python-latest/lib/python2.7/site-packages/twisted/web/http.py", line 750, in registerProducer
            producer.pauseProducing()
        exceptions.AttributeError: 'NoRangeStaticProducer' object has no attribute 'pauseProducing'

[...]

2009-07-18 06:30:35-0700 [HTTPChannel,5,192.168.0.3] Unhandled Error
        Traceback (most recent call last):
        Failure: exceptions.RuntimeError: Producer was not unregistered for /url1

2009-07-18 06:30:35-0700 [HTTPChannel,5,192.168.0.3] Unhandled Error
        Traceback (most recent call last):
        Failure: exceptions.RuntimeError: Producer was not unregistered for /url2

[...]

}}}

----------
Type     : defect
Component: web
Keywords : 
Priority : high
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3919
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.