Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8217 defect closed invalid (invalid)

twisted.web incompatible with AF_UNIX sockets

Reported by: Deven Phillips Owned by:
Priority: normal Milestone:
Component: web Keywords: AF_UNIX, UNIXAddress, web
Cc: Branch:
Author:

Description

2016-02-24 16:15:36-0500 [HTTPChannel,0,] Unhandled Error

Traceback (most recent call last):

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/protocols/basic.py", line 571, in dataReceived

why = self.lineReceived(line)

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/web/http.py", line 1720, in lineReceived

self.allContentReceived()

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/web/http.py", line 1799, in allContentReceived

req.requestReceived(command, path, version)

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/web/http.py", line 832, in requestReceived

self.process()

--- <exception caught here> ---

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/web/server.py", line 183, in process

self.render(resrc)

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/Twisted-15.5.0-py2.7-macosx-10.11-intel.egg/twisted/web/server.py", line 234, in render

body = resrc.render(self)

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/klein-15.3.1-py2.7.egg/klein/resource.py", line 149, in render

_extractURLparts(request)

File "/Users/deven.phillips/.virtualenvs/ops-ls/lib/python2.7/site-packages/klein-15.3.1-py2.7.egg/klein/resource.py", line 78, in _extractURLparts

server_port = request.getHost().port

exceptions.AttributeError: 'UNIXAddress' object has no attribute 'port'

2016-02-24 16:15:36-0500 [-] "-" - - [24/Feb/2016:21:15:36 +0000] "GET /v3/na/vm/4PBNODE01 HTTP/1.1" 500 4928 "-" "python-requests/2.9.1"

Change History (2)

comment:1 Changed 3 years ago by Tristan Seligmann

Resolution: invalid
Status: newclosed

As far as I can tell, this is a problem with klein, not with twisted.web itself. It looks like someone else already reported the bug in the klein bug tracker, so you may want to subscribe to that issue: https://github.com/twisted/klein/issues/102

comment:2 Changed 3 years ago by Tristan Seligmann

Oh, sorry, I only noticed you are the one that contributed a fix in klein after I wrote my response :)

Note: See TracTickets for help on using tickets.