[Bug 1604608] Re: ipv6 client causes errors in twisted.web
Alberto Donato
1604608 at bugs.launchpad.net
Fri Mar 27 14:54:39 UTC 2020
This is still an issue in 17.9.0-2ubuntu0.1 in bionic
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to twisted in Ubuntu.
https://bugs.launchpad.net/bugs/1604608
Title:
ipv6 client causes errors in twisted.web
Status in twisted package in Ubuntu:
New
Bug description:
If the client connecting to the twisted (16.0.0-1, still present in upstream 16.3.0), then twisted dies as follows:
2016-07-18 15:40:21 [HTTPChannel,468,::ffff:127.0.0.1] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1657, in lineReceived
self.allContentReceived()
File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1736, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/lib/python3/dist-packages/maasserver/webapp.py", line 80, in requestReceived
command, path, version)
File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 762, in requestReceived
self.process()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 183, in process
self.render(resrc)
File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 234, in render
body = resrc.render(self)
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 561, in render
self._reactor, self._threadpool, self._application, request)
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 293, in __init__
'REMOTE_ADDR': _wsgiString(request.getClientIP()),
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 85, in _wsgiString
return string.decode("iso-8859-1")
builtins.AttributeError: 'NoneType' object has no attribute 'decode'
In the attached patch, the middle block addresses the above immediate
issue, and the other two blocks are my best guess at what the code
_should_ read for completeness.
We'll want to get this SRUed into xenial, once it's fixed in wily, as
it's required for MAAS 2.1 (which runs on "latest LTS release" ==
xenial.)
thanks
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/twisted/+bug/1604608/+subscriptions
More information about the foundations-bugs
mailing list