Change in cgi module's handling of POST requests

Discussion in 'Python' started by Bob Kline, Feb 10, 2009.

  1. Bob Kline

    Bob Kline Guest

    [Didn't realize the mirror didn't work both ways]

    We just upgraded Python to 2.6 on some of our servers and a number of our CGI scripts broke because the cgi module has changed the way it handles POST requests. When the 'action' attribute was not present in the form element on an HTML page the module behaved as if the value of the attribute was the URL which brought the user to the page with the form, but without the query (?x=y...) part. Now FieldStorage.getvalue () is giving the script a list of two copies of the value for some of the parameters (folding in the parameters from the previous request) instead of the single string it used to return for each. I searched this newsgroup looking for a discussion of the proposal to impose this change of behavior, and perhaps I wasn't using the right phrases in my search, but I didn't find anything. I see that Perl still behaves the way pre-2.6 Python used to (not that I view that as a reason for anything). We'll work around the breakage by explicitly setting the 'action' attribute everywhere, of course, but I usually see some discussion (often heated) of the impact of behavior changes on existing software when something like this is in the works. Did I miss it?

    I also noted that the module is making some deprecated use of the BaseException class.

    Cheers.
     
    Bob Kline, Feb 10, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    2
    Views:
    556
    Wade A. Hilmo [MS]
    Nov 29, 2003
  2. Fernando Arámburu

    web requests and mobile requests

    Fernando Arámburu, Apr 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    472
    Joerg Jooss
    Apr 8, 2005
  3. Mac
    Replies:
    1
    Views:
    377
  4. fatted
    Replies:
    1
    Views:
    178
    Steve Grazzini
    Jul 25, 2003
  5. shumsta
    Replies:
    1
    Views:
    303
    Fabian Pilkowski
    Jul 22, 2005
Loading...

Share This Page