Message8260
Hi Christof:
Thanks for the additional analysis.
Ok, here is the joke. In client.py the line:
# see if we need to re-parse the environment for the form (eg Zope)
if form is None:
form is not None, it is:
FieldStorage(None, None, b'test')
but form.list is None because b'test' isn't a list.
if I move:
# In some case (e.g. content-type application/xml), cgi
# will not parse anything. Fake a list property in this case
if self.form.list is None:
self.form.list = []
after the 'if form is None:' so it applies in both cases of the if statement,
things work as expected.
This looked safe to me because the form should always be some type of cgi.FieldStorage.
However it broke a bunch of poorly written (by me) tests. I have fixed the tests.
I have also added a 'try: [...] except AttributeError [...]' block around it and
log a request to post to roundup-users when self.form.list generates an AttributeError.
I have checked it in on changeset: 8268:05d8806b25ad.
It has passed CI on github.
Christof can you run the current repository tip and verify that it fixes your issue.
Thanks. |
|
Date |
User |
Action |
Args |
2025-01-12 18:44:45 | rouilj | set | messageid: <1736707485.46.0.329656056567.issue2551387@roundup.psfhosted.org> |
2025-01-12 18:44:45 | rouilj | set | recipients:
+ rouilj, cmeerw |
2025-01-12 18:44:45 | rouilj | link | issue2551387 messages |
2025-01-12 18:44:45 | rouilj | create | |
|