From: Rando Christensen Date: 2004-06-24T15:08:19+09:00 Subject: Re: Why doesn't this work? (CGI) On Thu, 24 Jun 2004 14:42:01 +0900, Patrick May wrote: > > Hello, > > On Wednesday, June 23, 2004, at 11:28 PM, Dmitry V. Sabanin wrote: > >> The problem is that variables appear in CGI#params from QUERY_STRING >> or from >> POST data, but not from both at one time. You need to parse QUERY_STRING by >> yourself and then merge that with current #params content. > > I maintain an alternate CGI library, of debatable merit (in another thread). > > If a CGI library merged query and post data, how should the data be > merged? Should POST overwrite GET? Should POST and GET be added > together, returning multiple values if both contain the same keys? I would argue that you should have some standard way of overwriting (i.e. either post or query takes precedence), but also have a separate way to get JUST the post args or just the query args, so you'd have something like: args = cgi.args() p_args = cgi.args_post() q_args = cgi.args_query() That way, he who doesn't care where the data is coming from can just call args, but when you need a more specific way to look, you ask for either the query args or the post args (or more likely, grab both into two separate hashes) -- Rando Christensen eyez@illuzionz.org