in reply to Obtain matrix info
Your hand-made CGI parameter parsing routine has a bug in it (as do most such routines that I've seen). You assume that your CGI query string will only contain each key once. This may be valid in your particular case, but it's not what the CGI spec says.
If your code gets a query string that looks like this:
key1=val1&key2=val2a&key2=val2b
The 'val2a' value is overwritten with the value 'val2a' in the %form hash.
Why do people insist on reinventing these routines when Perl comes with a module (CGI.pm) which does this right? Why go to all the effort of re-writing it with a bug?
I realise that it probably works fine in your application because you don't use multi-valued CGI parameters, but the danger is that someone else will read your code and cut and paste it into their program.
--
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: Obtain matrix info
by sinan (Sexton) on Jul 29, 2000 at 20:16 UTC | |
by davorg (Chancellor) on Jul 29, 2000 at 20:33 UTC | |
by sinan (Sexton) on Jul 30, 2000 at 15:18 UTC | |
by davorg (Chancellor) on Jul 30, 2000 at 15:31 UTC | |
by sinan (Sexton) on Jul 30, 2000 at 15:42 UTC | |
| |
| |
by merlyn (Sage) on Jul 29, 2000 at 20:23 UTC |