[Twisted-web] HTTP client TODOs
Scott Lamb
slamb at slamb.org
Fri Nov 4 09:13:32 MST 2005
Oh, and here's a couple more:
* It doesn't have any cookie management. You can add a raw header for
cookies, but probably most clients will want more than that. I haven't
looked at what twisted.web.client does.
* There's some circumstance in which timeouts can be canceled twice,
yielding the traceback below. I haven't gotten it in a while, but I
think it's still there.
What's the policy on bugs in branches? Should I add this to the tracker?
Traceback (most recent call last):
File "./load_generator.py", line 204, in main
reactor.run()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 206, in run
self.mainLoop()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 217, in mainLoop
self.doIteration(t)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/selectreactor.py",
line 133, in doSelect
_logrun(selectable, _drdw, selectable, method, dict)
--- <exception caught here> ---
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/python/log.py",
line 58, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/python/log.py",
line 43, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/selectreactor.py",
line 149, in _doReadOrWrite
self._disconnectSelectable(selectable, why, method=="doRead")
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 238, in _disconnectSelectable
selectable.readConnectionLost(f)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 390, in readConnectionLost
self.connectionLost(reason)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 555, in connectionLost
Connection.connectionLost(self, reason)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 401, in connectionLost
protocol.connectionLost(reason)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/web2/client/http.py",
line 351, in connectionLost
self._dealWithFailure(failure)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/web2/client/http.py",
line 323, in _dealWithFailure
self.request.cancelTimeout()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/web2/client/http.py",
line 120, in cancelTimeout
self._timeoutCall.cancel()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/internet/base.py",
line 75, in cancel
raise error.AlreadyCalled
twisted.internet.error.AlreadyCalled: Tried to cancel an already-called
event.
More information about the Twisted-web
mailing list