Am 15.07.2011 11:06 schrieb F. Behrens:
> If you send a POST form with an URL that includes GET data then
> FieldStorage will include both. Especially if you POST something like
> "id=42" and have "id=23" in the URL, FieldStorage will end up with "id:
> [42,23]", breaking code that expects a number here.
> Typically this unwantedly happens with forms that use POST but have been
> created from a GET request and do not explicitly specify an ACTION
> property in the FORM tag.
> This behaviour is new with 1.* and did not occur in older versions of
we need to break this bug/feature down a bit.
POST and GET parameters being merged into the request fields is actually
a WebKit quirk that was added in version 0.6 already
(http://www.webwareforpython.org/WebKit/Docs/RelNotes-0.6.html) and is
sometimes useful so I don't want to change that.
However, the WebKit behavior has been that on merging, POST parameters
would actually *overwrite* GET parameters with the same name, not append
to them. I.e. if "id=23" is in the URL and "id=42" is a POST parameter,
then request.field('id') should be just '42', not '23' or ['42', '23'].
So what you are reporting here looks like a bug.
I haven't really looked into this so far, but a quick tests showed that
this bug happens only with Python 2.6 or newer. Can you confirm? When
upgrading to Webware 1.x, did you also upgrade the Python version?