Roundup Tracker - Issues

Message6551

Author schlatterbeck
Recipients rouilj, schlatterbeck
Date 2019-06-19.17:57:22
Message-id <1560967042.68.0.358271823986.issue2551047@roundup.psfhosted.org>
In-reply-to
The rest implementation uses several calls to client.request.headers.
In WSGI 'request' is a RequestDispatcher object from
roundup/cgi/wsgi_handler.py
This object doesn't have a 'headers' attribute.

My naive implementation of a headers object would be to take the header
name, convert it to uppercase and replace '-' with '_', prefix it with
HTTP_ and look it up in the CGI environment. Is this an acceptable
solution? Alternatives, better ideas?

I found a google groups article that goes into the same direction:
https://groups.google.com/forum/#!topic/modwsgi/swJmEP79Pds

Traceback when calling rest uri with WSGI:
Traceback (most recent call last):
  File
"/usr/local/lib/python2.7/dist-packages/roundup/cgi/wsgi_handler.py",
line 74, in __call__
    client.main()
  File "/usr/local/lib/python2.7/dist-packages/roundup/cgi/client.py",
line 471, in main
    self.handle_rest()
  File "/usr/local/lib/python2.7/dist-packages/roundup/cgi/client.py",
line 572, in handle_rest
    self.path, self.form)
  File "/usr/local/lib/python2.7/dist-packages/roundup/rest.py", line
1723, in dispatch
    headers = self.client.request.headers
AttributeError: 'RequestDispatcher' object has no attribute 'headers'
History
Date User Action Args
2019-06-19 17:57:22schlatterbecksetrecipients: + schlatterbeck, rouilj
2019-06-19 17:57:22schlatterbecksetmessageid: <1560967042.68.0.358271823986.issue2551047@roundup.psfhosted.org>
2019-06-19 17:57:22schlatterbecklinkissue2551047 messages
2019-06-19 17:57:22schlatterbeckcreate