[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Re: [MacPerl-AnyPerl] Checkbox CGI



On 6/22/00 1:17 PM -0400, you wrote:
>On Tue, 20 Jun 2000 19:53:43 -0700 Bruce Van Allen <bva@cruzio.com> wrote:
>
>> Both cases also show why the best strategy for _any_ form-processing
>> CGI is to have the script generate the HTML form from the git-go;
>> that way the script always 'knows' what's coming.
>
>Anyone can submit any GET or POST request to your CGI script at any time,
>so you shouldn't count on receiving valid data.  Don't make assumptions
>about your CGI's input unless you're sure that nothing bad will happen if
>your assumptions fail.
>

Which reinforces my point that the HTML should be generated by the 
script, so the script can always recognize and respond appropriately 
to input, spurious or otherwise. A call to the CGI with no arguments 
generally should return a blank form; a call with unexpected 
parameters should do likewise or return an error message or redirect.


- Bruce

_Bruce_Van_Allen___bva@cruzio.com__Santa_Cruz_CA_

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org