in reply to Should I just print my own HTTP headers?

It absolutely depends on what are you trying to accomplish. Are you only printing a single line? Don't you really need a CGI parameter processing? Oh you said only one numeric parameter. Are you sure the user will ever only type in that numeric input? Do you really trust that? Don't you ever worry that the user will indeed just fill in the parameter with whatever pleases him/her, say a 5MB beast of something?

My simple rule of thumbs for web application:

  • Comment on Re: Should I just print my own HTTP headers?

Replies are listed 'Best First'.
Re^2: Should I just print my own HTTP headers?
by Cap'n Steve (Friar) on Apr 13, 2007 at 02:47 UTC
    Well, it should only be run via a mod_rewrite rule, but it's easy enough to double check:
    if ($ENV{'QUERY_STRING'} !~ /^\d{,10}$/) { die 'Invalid ID'; }